January 2001
Beginner
312 pages
6h 4m
English
Of the examples in this chapter, this one is probably the simplest and the one that needs the least code for accomplishing the effect.
Adding a last modified date to a Web page enables your visitors to know when the page last changed, which in turn helps them decide whether they want to read the page. It's a great example and really easy to use. Here it is in action:
<html>
<head>
<title>A Simple Page</title>
</head>
<body>
<script language = "JavaScript">
<!-- Cloaking device on!
document.write("Page last updated: " + document.lastModified)
// Cloaking device off -->
</script>
</body>
</html>
This example uses one method and one property of the document object. It uses the lastModified property ...
Read now
Unlock full access