<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.

disabledSets or returns whether the reset button should be disabled.Yes
formReturns a reference to the form object that contains this reset button.Yes
nameSets or returns the name of the reset button.Yes
typeReturns the form element type of the reset button.Yes
valueSets or returns the text displayed on the reset button.Yes

Standard Properties and Events

The Reset object also supports standard properties and events .