0

I have a <select> in my JSP page, I am populating it dynamically. I have stored the <select> in a javascript variable selectObj using JQuery.

selectObj = $("mySelectId");

How can I access the options? I want to change each option's background color.

  • Example: `selectObj.find("option").last().text("xyz").css("background-color", "red");` https://jsfiddle.net/d9sro0wt/ – freedomn-m May 19 '22 at 08:00

0 Answers0