Entry
How do I clear a form?
How do I reset a FORM?
Mar 10th, 2000 09:31
Martin Honnen, BJ Neyer,
FORM objects have a
reset
method you can call to reset/clear a form. It has the same effect like
an
<INPUT TYPE="reset">
button meaning it restores the initial values of all form elements.
So call
document.formName.reset();
or
document.forms[formIndex].reset();
or
document['formName'].reset();
depending on how your reference your form. See also
http://www.faqts.com/knowledge-base/view.phtml/aid/1544/fid/129/lang/
on how to reset all forms in a document.