required_attribute.html (959B)
1 <!DOCTYPE html> 2 <html> 3 4 <head> 5 <title>Required Attribute</title> 6 <meta name=viewport content="width=device-width, maximum-scale=1.0, user-scalable=no" /> 7 <link rel="author" title="Fabrice Clari" href="mailto:f.clari@inno-group.com"> 8 <link rel="author" title="Dimitri Bocquet" href="mailto:Dimitri.Bocquet@mosquito-fp7.eu"> 9 <link rel="help" href="https://html.spec.whatwg.org/multipage/#attr-input-required"> 10 <script src="/resources/testharness.js"></script> 11 <script src="/resources/testharnessreport.js"></script> 12 </head> 13 14 <body> 15 16 17 <h1>Required Attribute</h1> 18 <div style="display: none"> 19 <input type="text" required="required" /> 20 </div> 21 22 <div id="log"> 23 </div> 24 25 <script type="text/javascript"> 26 27 28 test(function() {assert_equals(document.getElementsByTagName("input")[0].getAttribute("required"), "required")}, "required attribute support on input element"); 29 30 </script> 31 32 </body> 33 34 </html>