Example Problem
Exam 1
1. (20 minutes) Create an HTML document that has the words “Exam 1 Problem 4” .
- The tet must be in purple, underlined, 36pt, courier text and placed 50 pixels
from the right side and 50 pixels up from the bottom of the browser.
- The text must be surrounded by a grooved, thick, red box. Use the div tag to
accomplish this formatting.
- There must also be a single link on the page to the Ithaca home page. When the
mouse is placed over the link, put a warning in the status bar “you must have the
code number to enter this link”. When the mouse leaves the link, change the status
bar to a blank.
- When the link is clicked, ask the user for a number (use “5” as the default). If
the number is between 0 and 42 go to the Ithaca home page. If the number is between
52 and 100 also go to the Ithaca home page. If the number fits neither of these cases,
then do not go to the home page, then add 10 to the number, multiply it by 2 and display
the result in an alert box with the message “Did you mean Number” where Number is the
number that you calculated. You must use a boolean operator (i.e., the operators for and,
or or not) in your code and your javaScript code must be in a function.