HTML and CSS Reference
In-Depth Information
Perform the following tasks:
1. Start Notepad++ and open the lab9-2.html file from the Chapter09\IntheLab folder of the Data
Files for Students, and save the file as lab2-1solution.html.
2. Start a new <script> section in the <head> section, on the line following the <title> tag, for
four user-defined functions. Write a JavaScript function to change the scroll bar colors called
healthFoodScroll(). Use the code in Table 9-21 as a guide, and use the following color values for
the scroll bar face and track colors:
face color: #e88028
track color: #d15900
3. Using the code in Table 9-24 on page HTML 431 as a guide, write a JavaScript function called
menuLinks() that uses the <select> list infoMenu to go to a different Web page.
4. Enter the HTML code to create a <div> tag with an id attribute of displayCountDown between the
two orange divider line images, hrimg-healthy.gif.
5. Write a JavaScript user-defined function called grandOpening() to take the current date and
calculate the number of days until the grand opening. Use a future date associated with the current
date in your code. The script code should display a dynamic message, as shown in Figure 9-23.
6. Before the closing </body> tag, enter the HTML code to create a container tag of your choice with
an id attribute of displayCopyRight.
7. Using the code in Table 9-27 on page HTML 432, write the JavaScript user-defined function to
display a copyright message and the date the Web page was last modified.
8. Add the event handler in the appropriate HTML tag to call the healthFoodScroll(), grandOpening(),
and copyRight() functions when the Web page loads. Add the onChange() event handler to call the
menuLinks() function in the <select> tag when the user selects an item from the drop-down menu.
9. Save the completed HTML file, validate it, and test it using your browser. If an error occurs, check
your code and save and test again.
10. Submit the completed HTML file and Web page in the format specified by your instructor.
Search WWH ::




Custom Search