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