Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <p>A form with an email field that that must be in the following order: characters@characters.domain (characters followed by an @ sign, followed by more characters, and then a ".". After the "." sign, you can only write 2 to 3 letters from a to z:</p> <form action="http://www.w3schools.com/jsref/demo_form.asp"> E-mail: <input type="email" id="myEmail" name="email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$"> <input type="submit"> </form> <p>Click the "Try it" button to display the value of the pattern attribute of the email field.</p> <button onclick="myFunction()">Try it</button> <p><strong>Note:</strong> input elements with type="email" are not supported in IE 9 (and earlier), or Safari.</p> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myEmail").pattern; document.getElementById("demo").innerHTML = x; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_email_pattern by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:32:53 GMT --> </html>
Result:
Try it Yourself - © w3schools.com