315920-29b.html (534B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <style> 5 optgroup {color: red} 6 optgroup:disabled {color: green} 7 optgroup[disabled]:disabled + optgroup {color: green} 8 optgroup:not(:disabled) {color: red} 9 </style> 10 </head> 11 <body onload='document.getElementById("ogone").setAttribute("disabled", "disabled");'> 12 <select size="2"> 13 <optgroup id="ogone" label="There should be no red"> 14 </optgroup> 15 <optgroup id="ogtwo" label="There should be no red"> 16 </optgroup> 17 </select> 18 </body> 19 </html>