Note: The answers have now been posted. To see the answers for an exercise, click on the Answers! link, then view the source of the page. (Go to Netscape's View menu and choose Page Source.)
bridge_install conditionalsin an xterm. The files will be installed in
/u/[your user name]/projects/functions.
In this exercise, you'll write a function called guessAge() that, oddly enough, lets the user guess your age. The user's guess is in document.ageForm.ageGuess.value. The guessAge() function should pop up an alert box telling the user whether or not s/he guessed correctly.
XEmacs. You can copy your completed
conditionals2.html if you'd like to edit your
existing work rather than starting from scratch.
In this exercise, you'll modify your age guesser from exercise #1 to provide some additional feedback to the user. The guessAge() function's alert box should let the user know if s/he guessed correctly, if you're younger than the guess, or if you're older than the guess.
Everyone knows that flowers need water to grow. This HTML page has a watering can and a flower. This particular flower needs to be watered three times before it can grow. When the user clicks on the watering can, it should change to the image
can-water.gif. After one second, the
watering can should stop watering the flower. (We provide
this code for you; read the comments in the program
carefully.) The third time the user waters the flower, the
flower should bloom. (There's an image of a bloomed flower