HTML DOM Reset object
Reset object
In HTML forms, every time a label appears, a Reset object is created.
When the reset button is clicked, the values of all input elements in the form that contain it are reset to their default values. The default value is specified by the HTML value property or javaScript's defaultValue property.
The reset button triggers the onclick handle before resetting the form, and the handle can be canceled by returning fasle.
You can access a reset button by traversing the form's array of elements, or by using document.getElementById().
Reset object properties
W3C: W3C standard.
Property | Describe | W3c |
---|---|---|
disabled | Whether the set or return reset button should be disabled. | Yes |
form | Returns a reference to the form object that contains this reset button. | Yes |
name | Set or return the name of the reset button. | Yes |
type | Returns the type of form element for the reset button. | Yes |
value | Set or return the text that appears on the reset button. | Yes |
Standard properties and events
Reset objects also support standard properties and events.