HTML DOM reset() Method
Complete Form Object Reference
Definition and Usage
The reset() method resets the values of all elements in a form (the same as clicking the Reset button).
Syntax
Example
<html>
<head>
<script type="text/javascript">
function formReset()
{
document.getElementById("myForm").reset()
}
</script>
</head>
<form id="myForm">
Name: <input type="text" size="20"><br />
Age: <input type="text" size="20"><br />
<br />
<input type="button" onclick="formReset()" value="Reset">
</form>
</body>
</html>
|
Try-It-Yourself Demos
Reset a form
Complete Form Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|