I wanted to dynamically set color for some of the options in a drop down list. I tried the following call:
document.getElementById("selectedKeys").options[i].style = 'color:red';
This did not work, at least in IE.
For this to work, i had to do something like this:
document.getElementById("selectedKeys").options[i].style.color = 'red';
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment