Reset value Property
Reset Object
Definition and Usage
The value property sets or returns the value of the value attribute of the
reset button.
The value attribute defines the text that is displayed on the reset button.
Syntax
Set the value property:
resetObject.value="value"
Return the value property:
Browser Support

The value property is supported in all major browsers.
Example
Example
Display the value of the Reset button:
<html>
<head>
<script>
function displayResult()
{
var x=document.getElementById("reset1").value;
alert(x);
}
</script>
</head>
<body>
<form>
Email: <input type="text" id="email">
<input type="reset" id="reset1" value="Reset form">
</form>
<button type="button" onclick="displayResult()">Display value</button>
</body>
</html>
Try it yourself »
Reset Object
Thank You For Helping Us!
Your message has been sent to W3Schools.
Close [X]