var x = document.getElementById("mySelect"); //select id here
var i;
for (i = 0; i < x.length; i++) {
tex=x.options[i].text; // option text
var tex = tex.toLowerCase(); //make it lower
x.options[i].style.backgroundColor = tex; // set the background color for that
}
you can use css
label[for=options_455_2]
{
/* ...add css here... */
}
Comments
Post a Comment