V
V
VanilaSpirit2020-09-01 14:39:31
JavaScript
VanilaSpirit, 2020-09-01 14:39:31

js. How to distinguish incoming records to a script?

There are several identical blocks on different pages - but they all refer to the same script, there are practically no differences in layout, except that somewhere there is a button, somewhere it is different, somewhere it does not exist at all.
id in the blocks is busy, we can say that it is the same too. Is it normal practice to add a class to each of the pages , say: on 1 page -<div>
<div>

<div class="(стд.набор классов) .. firstPageElement">

on page 2 -
<div class="(стд.набор классов) .. secondPageElement">

etc.

Or are there other definitions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pashok Doom, 2020-09-01
@Benzin102

Class, hidden input, data attribute, page url

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question