Latest web development tutorials

HTML DOM Reset objects

Reset objects

In the HTML form <input type = "reset"> tag appears every time a Reset object is created.

When the reset button is clicked, it contains all the values ​​of the form input elements are reset to their default values. The default value is specified by defaultValue attribute of HTML value attributes or JavaScript.

Before the reset button to reset the form to trigger onclick handler, and the handler can return fasle to cancel.

You can traverse the form elements [] array to access a reset button, or by using document.getElementById ().


Reset Object Properties

W3C: W3C standards.

Attributes description W3C
disabled Sets or returns whether the reset button should be disabled. Yes
form It returns a reference to the form object that contains the reset button. Yes
name Sets or returns the name of the reset button. Yes
type Returns the reset button form element type. Yes
value Sets or returns the text displayed on the reset button. Yes

Standard properties and events

Reset the object also supports the standard attributes and events .