Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1672 When a page reloads (due to the user pressing back) how do I clear a form of all the user entered data?

You are here: irt.org | FAQ | JavaScript | Form | Q1672 [ previous next ]

Simply invoke the form's reset method, immediately after defining the form, for example:

<form name="myForm">
<input type="text">
</form>

<script language="JavaScript"><!--
document.myForm.reset();
//--></script>

©2018 Martin Webb