Skip to content
Advertisement

Set Button id from javascript

I have a dropdown list which filled with the data fetched from db. I need to assign the selected index value of this dropdown list as the ID of a button. Is it really possible?

my code

JavaScript

Advertisement

Answer

Might be this will solve your problem. I have added a class on btn call CustomerModalBttn .

Try this

JavaScript
Advertisement