348809-1e.html (426B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <style> 5 span { color: green } 6 :default:checked + span { color: red } 7 input { display: none } 8 </style> 9 </head> 10 <body> 11 <form> 12 <div> 13 <input type="submit"> 14 <input type="radio" checked="checked" id="foo"> 15 <span>There should be no red</span> 16 </div> 17 </form> 18 <script> 19 var foo = document.body.offsetWidth; 20 document.getElementById("foo").setAttribute("type", "submit"); 21 </script> 22 </body> 23 </html>