You are here: irt.org | FAQ | JavaScript | Form | 9 | Q838 [ previous next ]
Use HTML to provide a default value:
<FORM NAME="myForm"> <INPUT TYPE="TEXT" VALUE=""> </FORM> <SCRIPT LANGUAGE="JavaScript"><!-- document.myForm.reset(); //--></SCRIPT>
If that doesn't work then:
<FORM NAME="myForm"> <INPUT NAME="myField" TYPE="TEXT"> </FORM> <SCRIPT LANGUAGE="JavaScript"><!-- document.myForm.myField.value = ''; //--></SCRIPT>