Skip to content
Advertisement

How to give id to auto generated element automatically

I want to make a dropdownlist that contains something from my database, all going well until I need to give each of the option unique id

JavaScript

Advertisement

Answer

Put an id unique value in option tag, and order you code for make an array with html tag, for example if $row1[0] = uniqueid and $row1[1] = name

JavaScript

Best Regards

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