Input Reset value Attribute
Definition and Usage
value
Sets or returns the value of the reset button's value attribute.
The HTML value attribute defines the text displayed on the reset button.
See also:
HTML Reference Manual:HTML <input> value Attribute
Instance
Example 1
Change the text displayed on the reset button:
document.getElementById("myReset").value = "New reset button value";
Example 2
Retrieve the text displayed on the reset button:
var x = document.getElementById("myReset").value;
Syntax
Return value attribute:
resetObject.value
Set value attribute:
resetObject.value = text
Attribute Value
Value | Description |
---|---|
text | Text displayed on the reset button. |
Technical Details
Return Value: | A string value representing the text displayed on the reset button. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |