HTML and CSS Reference
In-Depth Information
Table 11-10 Code to Show the Date Last Modified
function copyRight() {
var lastModDate = document.lastModified
var lastModDate = lastModDate.substring(0,10)
displayCopyRight.innerHTML = "The URL of this document is "+document.URL+"<br />Hickory Oaks
Forest Preserve"+"<br /> This document was last modified "+lastModDate +".</p>"
The following steps enter the HTML <footer> tag and the JavaScript user-defined function to show copyright
information and the date the file was last modified using the substring() method so it is displayed at the bottom of
the Web page.
Click line 119.
shown in Table 11-9
on the previous page
to position the
copyright message
at the bottom of the
page (Figure 11-11).
Enter the HTML code
footer container created to
display copyright and date
Web page last modified
do not press
e n t e r key
Figure 11-11
press the e n t e r key.
Click line 29 and then
code to display
copyright and
date Web page
last modified
the JavaScript code
shown in Table 11-10
and then press
the e n t e r key
(Figure 11-12).
On line 30, enter
insertion point
Figure 11-12
To Enter onLoad Event Handlers in the <body> Tag
With the code for the user-defined functions entered to display the random pictures, the copyright
information, and the date last modified, the final step is to add the onLoad event handlers in the <body> tag to
invoke the rndimage() and copyRight() user-defined functions. The following step enters the event handlers in the
<body> tag.
Search WWH ::

Custom Search