You are here: irt.org | FAQ | JavaScript | Date | Q470 [ previous next ]
Try:
<script language="JavaScript"><!-- function stamp() { document.myForm.dateandtime.value = new Date(); } //--></script> <form name="myForm" onSubmit="stamp()"> <input type="hidden" name="dateandtime"> <input type="submit"> </form>