Automatic Page Update Information
Do you update your site frequently? Wouldn't it be nice to have the last update date
listed on the pages so that your users know that the page is current? JavaScript provides a simple way to do this:
<HTML>
<HEAD></HEAD>
<TITLE> Displaying Update Info</TITLE>
<BODY bgcolor=ffffff>
<script language="JavaScript">
<!--hide script from old browsers
document.write("<h2>This page has been updated: " +
document.lastModified + "</h2>")
// end hiding -->
</SCRIPT>
</BODY>
</HTML>
|
Listing 1.4
Output from listing 1.4
|
 
|
Sponsored By:
 3-D Cards Firewalls HTML Authoring Java + JavaScript Feature + Cool Java Apps + Brewing Your Own + Applet Tutorial + JavaScript Tutorial + Beyond the Browser + Java Resources + Java Bookshelf Netscape Plug-ins Offline Web Agents Search Engines Utilities Web Animation Web Audio Web Video
 ISPs Net PCs Windows NT
 Controls, How-Tos, Reviews
|