Reset the fields in a form : Form Reset : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » Form Reset »

 

Reset the fields in a form



<html>
<head>

<script type="text/javascript">
function formReset(){
    var x=document.forms.myForm
    x.reset()
}
</script>

</head>
<body>

<form name="myForm">
<p>Enter some text in the text fields and then press the "Reset form" button</p>
<input type="text" size="20"><br>
<input type="text" size="20"><br>
<br>
<input type="button" onclick="formReset()" value="Reset form">
</form>

</body>
</html>



           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» Form Reset