Explanatory Question
How to get dynamic ID of a button in jQuery
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.
I have written below code of HTML. Here id="1" , id="2", id="3", id="4" ............ id="100" dynamically created.
In this case we are targeting the class highlight and then taking the id using attr() function.
I have written below code of HTML.
In this process I am directly targeting the class and taking its id.
I have written below code of HTML.
First read the answer fully, then try to explain it in your own words. After that, open a few related questions and compare the concepts. This method helps you remember the topic for a longer time and improves exam preparation.