HTML DOM Reset Object
Reset Object
In an HTML form, A Reset object is created each time the tag appears.
When the reset button is clicked, the values of all input elements in the form containing it 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 handler before resetting the form, and this handler can be canceled by returning false false.
You can access a reset button by iterating over the elements[] array of the form, or by using document.getElementById().
Reset Object Properties
W3C: W3C standard.
| property | Description | W3C |
|---|---|---|
| disabled | Sets or returns whether the reset button should be disabled. | Yes |
| form | Returns a reference to the form object containing 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 the standard property and Events.