| <html> |
| <head> |
| <title>required and valueMissing on readonly elements</title> |
| <script language="JavaScript" type="text/javascript"> |
| function log(message) { |
| document.getElementById("console").innerHTML += "<li>"+message+"</li>"; |
| } |
| |
| function test() { |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| v = document.getElementsByName("victim"); |
| |
| log((!v[0].validity.valueMissing && !v[1].validity.valueMissing) ? "SUCCESS" : "FAILURE"); |
| } |
| </script> |
| </head> |
| <body onload="test()"> |
| <p>There are two readonly form control elements below, both required and with some value: |
| validity.valueMissing should be false in both cases.</p> |
| <input name="victim" readonly required /> |
| <textarea name="victim" readonly required></textarea> |
| <hr> |
| <ol id="console"></ol> |
| </body> |
| </html> |