HTML and CSS Reference
In-Depth Information
To Save an HTML File and Test a Web Page
After completing a section of JavaScript code, you should test your Web page to
ensure the code works. You should not continue with the next section until you are sure
the scrolling message works correctly. With the code for the scrollingMsg() function
complete and the onLoad event handler added to call the function when the Web page
loads, you should save the HTML file and test the Web page. The following steps save
the HTML file and then test the Web page.
1
Click File on the menu bar, click Save As, and then type chapter9-10solution.html in
the File name text box (do not press the ENTER key).
2
Navigate to the storage device and folder (Chapter10\ChapterFiles) where you save your
Data Files and then click the Save button in the Save As dialog box to save the file.
3
Open Internet Explorer and type G:\Chapter10\ChapterFiles\chapter10-1solution
.html in the Address box.
4
Press e n t e r to display the Web page. If a security message appears at the bottom of the
browser window, click the Allow blocked content button. (If you are running Internet
Explorer 8 or lower, your security message may be different.) The message should start
scrolling in the form text field (Figure 10-13).
5
Before proceeding to the next section, verify that this code works. If you have errors,
check your code against Figures 10-3, 10-10, 10-11, and 10-12. Correct any mistakes, save
your Web page file, and refresh the browser.
What if I do not see a security message?
It may mean that tight restrictions and security are not set on your browser. You may have
to refresh your browser or close it and restart the browser.
scrolling message displays
after JavaScript executes
Figure 10-13
 
Search WWH ::




Custom Search