Click to See Complete Forum and Search --> : Help wif current date scirpt


caterpillarsg
12-22-2002, 09:05 AM
where do i insert this script in a html?

<SCRIPT LANGUAGE="JavaScript">
var monthNames = new Array(
"Jan.","Feb.","March","April","May","June","July","August","Sept.","Oct.","N
ov
.","Dec.");
var now = new Date();
document.write(monthNames[now.getMonth()] + " " + now.getDate() + ", "
+
2000);
</SCRIPT>

I need to insert it into a table in the html page.

pyro
12-22-2002, 09:23 AM
Just copy the script to wherever you want it to appear in your HTML. If you want it in a cell of a table, do this.

<table>
<tr>
<td>
<!--Your script here-->
</td>
</tr>
</table>

David Harrison
12-22-2002, 09:39 AM
If I were you this is the source I would use:

<html><head>

<SCRIPT LANGUAGE="JavaScript">
var monthNames = new Array("Jan.","Feb.","March","April","May","June","July","August","Sept.","Oct.","Nov.","Dec.");

var now = new Date();

hello=(monthNames[now.getMonth()] + " " + now.getDate()+ ", " + 2000);

</SCRIPT>

</head>

<body>

<table><tr><td>

<script language="javascript">
document.write(hello)
</script>

</td></tr></table>

</body></html>

Or if you would prefer the same source in a web-page then download the attachment and unzip it.