August 1999
Intermediate to advanced
1488 pages
72h 53m
English
form.reset()
The reset method of the Form object resets all the form elements to their default values. It operates the same as a mouse click on a Reset button for the calling form.
Listing 7.265 shows how the reset method is used to reset a form. When the Reset button is clicked, all values in the form object are reset (text boxes are cleared of their values).
<html>
<head>
<title> Using the reset method of the Form object</title>
</head>
<body>
<script language="JavaScript">
<!-- Hide
function resetForm(form){
document.form1.reset(form);
}
// End Hide --->
</script>
<form name="form1"> Field 1:<input ... |
Read now
Unlock full access