Lab 11 - It 130

  1. Create a directory named lab11 at your students account and locally.
  2. Redo lab9 question 2, using textboxes to get the input and a function to compute the future value.
  3. Create a sub directory of it130 called lab 11. Both locally and at your students account.
  4. Create a sub directory of lab 11 called images.
  5. Download the following images and save them to your images sub directory
  6. Type in the following piece of code.
  7. <html> <head> <script> function imgChange(animal) { document.images.imgAnimal.src = "images/" + animal + ".jpg"; } </script> <style> table{ border:2px solid darkgreen; } td{padding:5px 10px 5px 5px;} </style> </head> <body> <h1>A Few of my Favorite Pets</h1> <p><img name="imgAnimal" src="images/bear.jpg" /></p> <form name="frmImageChange"> <table> <tr> <td> <input type="button" value="Lions" onclick="imgChange('lion');" /> </td> <td> <input type="button" value="Tigers" onclick="imgChange('tiger');" /> </td> <td> <input type="button" value="Bears" onclick="imgChange('bear');" /> </td> </tr> </table> </body> </html>

    Find two more images of animals and add two more buttons to the form to reflect the new animals.

  8. Type and Run the following piece of code
  9. <html> <head> <title>If Demo Page</title> <script type="text/javascript"> function showMessage() { var score = document.scoreForm.scoreBox.value; score = parseFloat(score); if(score < 60) { alert("You failed !"); } else { alert("You Passed !"); } } </script> </head> <body> <form name="scoreForm"> <p>Enter your score: &nbsp;<input type="text" name="scoreBox" size="10" value"" /></p> <p><input type="button" value="Click for Message" onclick="showMessage();" /> </form> </body> </html>
  10. Download, study and run the code for true-false-quiz.html Add 3 more true false questions to the program.
  11. Work on Hw4
  12. Work on Project