You are here: irt.org | FAQ | JavaScript | Form | 6 | Q920 [ previous next ]
Try:
<script language="JavaScript"><!-- function defaultField(what,text) { if (what.value == '') what.value = text; } //--></script> <form onSubmit="defaultField(this.form.tel,'No phone')"> <input type="text" name="tel"> </form>