WEEK: 8

Homework

Homework Video

This week’s homework incorporates JavaScript into your HTML pages. You are going to add some basic form validation on the Contact Us page.

For extra credit you can:

Add a fourth page, which has the simple math game from earlier. However, you will need to change it to keep track of how many the player gets correct and wrong. Also, show the user their final percentage. For example, if they get 2/4 correct, they should see that they got 50% of the questions right.

Homework Walkthrough Video

Specifics:

  1. On the Contact Us page, make the name, email, and terms of the agreement required.
  2. If they do not enter something, put the focus (you are going to have to do some research to complete this one) on that textbox and turn it red.
  3. Take the Kahoot Quiz and upload your results to your repository.

The Math Game is Extra Credit

  1. For the simple math game, change the game to keep track of how many answers were correct and how many were incorrect after ten questions.
  2. Print out the number of correct and incorrect answers.
  3. Print out the percentage of correct answers to the total number of questions.

Upload everything into GitHub and turn in your link to Moodle.

Homework Example


Previous section:
Next section: