<html>
<head>
<title> Using the reset method of the Form object</title>
</head>
<body>
<script language="JavaScript">
<!--
function resetForm(form){
document.form1.reset(form);
}
-->
</script>
<form name="form1">
Field 1:<input type="text" size="20" name="text1"><br>
Field 2:<input type="text" size="20" name="text2"><br>
Field 3:<input type="text" size="20" name="text3"><br>
<input type="button" name=reset value="reset" onClick='resetForm(this.form)'>
</form>
</body>
</html>
|