Skip to content
Advertisement

how do i make a event listener for a button that is in a forwach loop

I have a for each loop where it loops through a table and the table has an id field which gets assigned to the button’s id. I need to see which button gets clicked (I need to get the value of the id). the id of the table is not 1,2,3,4,5 it is either a Q or A with a number; e.g one button’s id might be: Q21.

Advertisement

Answer

This might get you started:

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement