submit-button-click-when-disabled.html 338 B

123456789101112
  1. <form id="theForm" style="display:none"><button id="theButton" type="submit" disabled></button></form>
  2. <script src="../include.js"></script>
  3. <script>
  4. theForm.onclick = function() {
  5. println("FAIL! Should not click!");
  6. }
  7. test(() => {
  8. theButton.click();
  9. println("PASS! Did not click");
  10. });
  11. </script>