HTML DOM ResetObject
Reset Object
In an HTML form,<input type="reset">For each time the <input type="reset"> tag appears, aResetReset Object is created.
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 values are specified by the HTMLvaluevalue attribute or JavaScript'sdefaultValuedefaultValue attribute.
The reset button triggers the onreset handler before resetting the form,onclickand this handler can be cancelled by returningfalsefalse.
You can access a reset button by iterating through the form'selements[]elements array, or by usingdocument.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 the reset button. | Yes |
| name | Sets or returns the name of the reset button. | Yes |
| type | Returns the type of form element the reset button is. | Yes |
| value | Sets or returns the text displayed on the reset button. | Yes |
Standard Properties and Events
The Reset object also supports the standardproperties andandevents.。
Other Extensions