You can add a script to your page that automatically shows the date on which you last updated the page.
Here is the script:
<script language = "JavaScript">
<!--
function makeArray0() {
for (i = 0; i<makeArray0.arguments.length; i++)
this[i] = makeArray0.arguments[i];
}
var days = new makeArray0("Sunday","Monday","Tuesday",
"Wednesday","Thursday","Friday","Saturday");
var months = new makeArray0('January','February','March',
'April','May','June','July','August','September',
'October','November','December');
function nths(day) {
if (day == 1 || day == 21 || day == 31) return 'st';
if (day == 2 || day == 22) return 'nd';
if (day == 3 || day == 23) return 'rd';
return 'th';
}
function getCorrectedYear(year) {
year = year - 0;
if (year < 70) return (2000 + year);
if (year < 1900) return (1900 + year);
return year;
}
function y2k(number) { return (number < 1000) ?
number + 1900 : number; }
var last = document.lastModified;
var date = new Date(last);
var dateY2K = new Date(getCorrectedYear(date.getYear()),
date.getMonth(),date.getDate());
document.write("Last updated on " + days[dateY2K.getDay()]
+ ' ' + dateY2K.getDate() + nths(dateY2K.getDate()) + " " +
months[dateY2K.getMonth()] + ", " +
(y2k(dateY2K.getYear())) + ".");
//-->
</script>
|
|
More information
Dynamic HTML examples
Changing the appearance of links
Changing pictures with the mouse
Expanding and contracting outlines
Adding a date to your page
Adding a clock to your page
Displaying a message in the status bar
Displaying a page in a new window
Using a link to run a script
Using a button to run a script
|