OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <title>required and valueMissing on unaccepted input types</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 for (i = 0; i < v.length; i++) | |
16 log(!v[i].validity.valueMissing ? "SUCCESS" : "FAILURE"); | |
17 } | |
18 </script> | |
19 </head> | |
20 <body onload="test()"> | |
21 <p>There's a list of form control elements below, required attribute does not ap
ply to them: | |
22 validity.valueMissing should be false.</p> | |
23 <input name="victim" type="hidden" required /> | |
24 <input name="victim" type="range" required /> | |
25 <input name="victim" type="image" required /> | |
26 <input name="victim" type="reset" required /> | |
27 <input name="victim" type="button" required /> | |
28 <input name="victim" type="submit" required /> | |
29 <hr> | |
30 <ol id="console"></ol> | |
31 </body> | |
32 </html> | |
OLD | NEW |