Homework Class 1

The average weight of a penny is 2.5 grams. The average weight of a quarter is 5.67 grams.

Write an HTML file that contains two links that look like this:

Screen Shot 2013-11-03 at 9.59.26 PM

When the first link is clicked, pop up an alert box saying how much 50 pennies would weigh

When the second link is clicked, pop up an alert box saying how much 50 quarters would weigh

 

Make sure that your links stay on the page after they are clicked. (Hint: if you have any document.write() lines in there, you might want to take them out)

If you have any questions, send me a message here:

christina.lin.yang ( at ) gmail.com

We will go over the answer during our second class.

 

*** Note, if you use buttons to trigger the alert boxes, that is fine too!