<input> - reset
HTML DOM Reset object
Reset object
Each time the <input type="reset"> tag appears in an HTML form, a Reset object is created.
When the reset button is clicked, the values of all input elements in the containing form are reset to their default values. The default value is specified by the HTML value attribute or the JavaScript defaultValue attribute.
The reset button triggers the onclick handle before resetting the form, and this handle can be canceled by returning fasle.
You can access a reset button by iterating over the form's elements[] array, or by using document.getElementById().
Reset object attributes
W3C: W3C standard.
Attribute | Description | W3C |
---|---|---|
disabled | Sets or returns whether the reset button should be disabled. | Yes |
form | Returns a reference to the form object that contains this reset button. | Yes |
name | Sets or returns the name of the reset button. | Yes |
type | Returns the form element type of the reset button. | Yes |
value | Sets or returns the text displayed on the reset button. | Yes |
Standard Properties and Events
The Reset object also supports standard properties and events .