HTML and CSS Reference
In-Depth Information
To Display the Date Last Modified Using the substring() Method
The following steps enter the JavaScript code to add a <div> container and display the date the file was last
modified using the substring() method.
blank line just above
the </body> tag).
Enter the HTML
Click line 236 (the
<div> tag division with id attribute to
display date last modified formatted by
embedded id style “displayDateLast”
<div> tag code from
Table 10-30, but do
not press the e n t e r
key after line 237
(Figure 10-37).
do not press
e n t e r key
Figure 10-37
press the e n t e r key.
Enter the JavaScript
Click line 104 and
code from Table 10-31
on the previous page
to enter copyright and
code, pressing the
e n t e r key only at the
end of each complete
line (Figure 10-38).
code to insert
copyright and
date last modified
on Web page
Figure 10-38
of line 168 (the line that contains the <body> tag).
Press the
Position the insertion point in front of the “> at the end
code for additional call to
user-defined function with
onLoad event handler
s p a c e b a r ,
type copyRight()
after popUpNotice()
to add the call to
the copyRight() user-
defined function to
the <body> tag, and
do not press the e n t e r
key (Figure 10-39).
do not press e n t e r key
at end of statement
Figure 10-39
To Save an HTML File, Test a Web Page, and Print the HTML File
The code for the Shoreline State Bank Web page with a loan payment calculator
and pop-up window is complete. Now you should save the HTML file, test the JavaScript
code using a Web browser, and then print the HTML file.
With the USB drive plugged into your computer, click File on the menu bar, and then
click Save.
Click the browser button on the taskbar.
Click the Refresh button on the browser toolbar.
If necessary, click the Allow blocked content button. (If you are running Internet
Explorer 8 or lower, your security message may be different.)
Search WWH ::

Custom Search