form reset
Hi!
Does anyone know how to clear text in form <input> field where the text has been embedded into the html (it's were the value=x)?
<form method="post" name=frm1 onSubmit="return addOrderrader">
<tr><td align=right><input name=antal size=3 maxlength=3 value=1> </td><td><input name=produkt maxlength=21 value=10mstand> </td><td align=middle><input name=anktid size=5 maxlength=5 value=00522> </td><td align=middle>030</td></tr>
Thanks in advance.
John Pollock posted this at 17:09 — 9th June 2000.
He has: 628 posts
Joined: Mar 1999
Is there an event with which you want to do that (Like an onClick or onFoucus)?
The general command is:
document.form_name.element_name.value="";
In this case:
document.frm1.produkt.value="";
Java Script: A Beginner's Guide
Page Resource
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.