You are here: irt.org | BBS | Re: Default to Today's Date. [This BBS is closed]
Posted by Martin Webb on June 17, 1998 at 17:26:36:
In Reply to: Default to Today's Date. posted by Rachel on June 17, 1998 at 16:15:00:
: I would like to have a text box with today's date as the default value in it.
: How to do that in JavaScript?
: Thanks
: Rachel
<SCRIPT LANGUAGE="JavaScript">
var today = new Date ();
document.write ('<FORM><INPUT TYPE="TEXT" VALUE="' + today + '"></FORM>');
</SCRIPT>
Follow-ups:
You are here: irt.org | BBS | Re: Default to Today's Date. [This BBS is closed]