Answer the question
In order to leave comments, you need to log in
How to make a questionnaire with dynamic elements?
Variants of images are displayed in pairs on the page. The user chooses one of them, he is shown two other options, and so on. Until all options have been exhausted. It is necessary to remember how many times the user has chosen this or that answer. Tell me how to implement it?
Answer the question
In order to leave comments, you need to log in
If there are a limited number of images, and it makes sense for them to set an ID. And iterate the corresponding field in the object in js each time.
If dofiga and more - exactly the same way, we create an object in JS. When clicking on any of the images, we take its src and shove it into this object with the key = src. Well, if this key already exists, we iterate
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question