` tag in an HTML form, a **Reset** object is created. When the reset button is"> ` tag in an HTML form, a **Reset** object is created. When the reset button is" />
Easy Tutorial
❮ Met Doc Getelementsbyname Jsref Getutcdate ❯

HTML DOM


Reset Object

For each occurrence of the <input type="reset"> tag 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 values are 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.

You can access a specific reset button by iterating through the form's elements[] array 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 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 Attributes and Events

The Reset object also supports standard attributes and events.

❮ Met Doc Getelementsbyname Jsref Getutcdate ❯