HTML DOM Input Reset Object
- Previous page <input> range
- Next page <input> search
Input Reset Object
The Input Reset object represents the HTML <input> element that has been set with type="reset".
Accessing Input Reset Object
You can access the <input> element with type="reset" using getElementById():
var x = document.getElementById("myReset");
Tip:You can also search the form by elements collection to access <input type="reset">.
Creating Input Reset Object
You can create an <input> element with type="reset" using the document.createElement() method:
var x = document.createElement("INPUT"); x.setAttribute("type", "reset");
Input Reset Object Properties
Attributes | Description |
---|---|
autofocus | Set or return whether the reset button should automatically focus when the page is loaded. |
defaultValue | Set or return the default value of the reset button. |
disabled | Set or return whether the reset button is disabled. |
form | Return a reference to the form that contains the reset button. |
name | Set or return the name attribute value of the reset button. |
type | Return the type of the form element that the reset button is. |
value | Set or return the value of the value attribute of the reset button. |
Standard attributes and events
The Input Reset object supports both standardAttributesandEvents.
Related pages
HTML Tutorial:HTML Form
HTML Reference Manual:HTML <input> Tag
HTML Reference Manual:HTML <input> type Attribute
- Previous page <input> range
- Next page <input> search