dcsimg

Lesson 14: The Script and Its Effect



Note! "getYear()" has been updated to "getFullYear()" because of it now being past the year 2000.

The Script

<SCRIPT LANGUAGE="javascript">
<!-- Hide from browsers that do not understand JavaScript function dateinbar()
{
var d = new Date();
var y = d.getFullYear();
var m = d.getMonth() + 1;
var d = d.getDate();
var t = m + '/' + d + '/' + y + ' ';
defaultStatus = "You arrived at the page on " + t + ".";
}
// end hiding -->
</SCRIPT>

The Script's Effect

...look in the status bar.

 

Back to the Index Page