Javascript examples for DOM HTML Element:Form
Form noValidate Property - Set the noValidate property:
<!DOCTYPE html> <html> <body> <form id="myForm" action="#"> E-mail: <input type="email" name="user_email"> <input type="submit"> </form>/* w w w.j av a2 s. c om*/ <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { document.getElementById("myForm").noValidate = true; document.getElementById("demo").innerHTML = "The novalidate attribute is now added to the form element, and the form-data will NOT be validated on submission."; } </script> </body> </html>