1 / 8

Lab 2

Lab 2. One of these things is not like the other. Make a page like the one shown below. The game. In the game, two of the items in a row have something in common, and the third item is different.

kmaher
Download Presentation

Lab 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lab 2 One of these things is not like the other CSD 340 (Blum)

  2. Make a page like the one shown below. CSD 340 (Blum)

  3. The game • In the game, two of the items in a row have something in common, and the third item is different. • The user is to click on his or her guess. The page should indicate whether the choice is correct in two ways: an alert box saying correct or incorrect and color (my version uses white for correct and red for incorrect.) CSD 340 (Blum)

  4. Incorrect Example Part 1: Message CSD 340 (Blum)

  5. Incorrect Example Part 2: Color CSD 340 (Blum)

  6. Correct Example Part 1: Message CSD 340 (Blum)

  7. Correct Example Part 2: Color CSD 340 (Blum)

  8. One Function • Try to write your code using one function. • Mine had three arguments: • The id of the cell containing the image clicked, so I could change its color. • The RGB code of the color I wanted the cell to turn. • The word ‘correct’ or ‘incorrect’ as the case may be. CSD 340 (Blum)

More Related