OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <title>required and valueMissing on checkboxes</title> | |
4 <script language="JavaScript" type="text/javascript"> | |
5 function log(message) { | |
6 document.getElementById("console").innerHTML += "<li>"+message+"</li>"; | |
7 } | |
8 | |
9 function test() { | |
10 if (window.testRunner) | |
11 testRunner.dumpAsText(); | |
12 | |
13 v = document.getElementsByName("victim"); | |
14 | |
15 log(!v[0].validity.valueMissing && v[1].validity.valueMissing ? "SUCCESS
" : "FAILURE"); | |
16 } | |
17 </script> | |
18 </head> | |
19 <body onload="test()"> | |
20 <p>There are two checkboxes below, both are required, only one is checked.</p> | |
21 <input name="victim" type="checkbox" required checked/> | |
22 <input name="victim" type="checkbox" required /> | |
23 <hr> | |
24 <ol id="console"></ol> | |
25 </body> | |
26 </html> | |
OLD | NEW |