Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear a form

Status
Not open for further replies.

ahksar

Programmer
Jan 11, 2001
43
US
Hi, How do I clear a form once it has been submitted, or when a user clicks the back button on the browser?
Thanks
ahksar
 
Hey ahksar,

To add to Iza's post, this will clear the form when they click the back button. ( f1 is the name of your form )

<body onload=&quot;document.f1.reset();&quot;>

GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top