Button formNoValidate Property
Definition and Usage
formNoValidate
Property sets or returns whether form data should be validated when submitted.
This property is only used for buttons with type="submit".
When set to true, this property adds the "formnovalidate" attribute to the "submit" button and specifies that form data should not be validated when submitted. This overrides the form's novalidate attribute.
Note:formnovalidate attribute It is a new attribute of the <button> element in HTML5.
Instance
Example 1
Determine whether form data should be validated:
var x = document.getElementById("myBtn").formNoValidate;
Example 2
Set the formNoValidate property:
document.getElementById("myBtn").formNoValidate = false;
Syntax
Return the formNoValidate property:
buttonObject.formNoValidate
Set the formNoValidate property:
buttonObject.formNoValidate = true|false
attribute value
value | description |
---|---|
true|false |
Détermine si les données du formulaire doivent être vérifiées lors de la soumission
|
Détails techniques
Valeur de retour : | Valeur booléenne, retourne true si les données du formulaire ne doivent pas être vérifiées, sinon retourne false. |
---|
Support du navigateur
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |
Pages associées
Manuel de référence HTML :Attribut formnovalidate du <button> HTML