Javascript examples for DOM HTML Element:Input Submit
The formNoValidate property sets or gets whether the form-data should be validated before submit.
This property reflects the formnovalidate attribute.
Set the formNoValidate property with the following Values
Value | Description |
---|---|
true|false | Sets whether the form-data should be validated |
A Boolean, returns true if the form-data should not be validated, otherwise it returns false
The following code shows how to check if the form-data should be validated or not:
<!DOCTYPE html> <html> <body> <form action="#" method="get"> E-mail: <input type="email" name="userid"><br> <input type="submit" id="mySubmit" value="Submit" formnovalidate> </form>//from w w w .j a va 2s .c om <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { var v = document.getElementById("mySubmit").formNoValidate; document.getElementById("demo").innerHTML = v; } </script> </body> </html>