HTML DOM ResetObject


Reset Object

In an HTML form<input type="reset">Each time the tag appears, aResetobject is created.

When the reset button is clicked, the values of all input elements in the form that contains it are reset to their default values. The default values are specified by the HTMLvalueattribute or JavaScript'sdefaultValueattribute.

The reset button triggers before resetting the formonclickhandle, and this handle can be cancelled by returningfalseto cancel.

You can access a reset button by traversing the form'selements[]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 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 standardpropertiesyevents。

Other Extensions