You are here: irt.org | FAQ | JavaScript | Form | 10.1 | Q9 [ previous next ]
<form name="formName" onSubmit="return functionName();"> <input type=text name="textName"> <input type=submit value="Display"> </form> <script language="JavaScript"><!-- function functionName() { window.document.formName.textName.value = 'hello world'; return false; } //--></script>