315920-1b.html (467B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <style> 5 option {color: blue} 6 option:disabled {color: green} 7 option#one:not([disabled]):enabled + option#two {color: red} 8 </style> 9 </head> 10 <body onload='var elem = document.getElementById("one"); 11 elem.setAttribute("disabled", "disabled");'> 12 <select size="2"> 13 <option id="one">Should be green</option> 14 <option id="two">Should be blue</option> 15 </select> 16 </body> 17 </html>