button-disabled-fieldset-2.html 788 B

1234567891011121314151617181920212223242526
  1. <!DOCTYPE html>
  2. <html class="reftest-wait">
  3. <!-- Test: if button has a disabled fieldset ancestor, it is barred from
  4. constraint validation and should not be affected by :invalid
  5. pseudo-class. -->
  6. <link rel='stylesheet' type='text/css' href='style.css'>
  7. <script>
  8. function onloadHandler()
  9. {
  10. var e = document.getElementById('b');
  11. e.setCustomValidity('foo');
  12. var fieldsets = document.getElementsByTagName("fieldset");
  13. fieldsets[1].disabled = true;
  14. fieldsets[0].disabled = false;
  15. document.documentElement.className='';
  16. }
  17. </script>
  18. <body onload="onloadHandler();">
  19. <fieldset disabled>
  20. <fieldset>
  21. <button class='notinvalid' id='b'></button>
  22. </fieldset>
  23. </fieldset>
  24. </body>
  25. </html>