1. Engineering
  2. Computer Science
  3. it javascript click match animals create a web page that...

Question: it javascript click match animals create a web page that...

Question details

IT JavaScript

Click Match Animals

Create a web page that helps children learn their animal names. Here is an example, but your page might look different. You may use the image files here, or choose your own.

The green name that is displayed (e.g. LION below) should be selected at random. When the user clicks the refresh button, a new random animal name will be selected. (It's okay if the same random word shows up more than once.)

When the user clicks on an image, display a border around it. Make sure that only the selected image has a border. Then, If the selected image matches the animal name, display a positive message in green. If it doesn't match, display a negative message in red. The user should be able to click on more than one picture, until they get the correct answer. Each time they click, the image border changes and an appropriate response message is displayed.

Make sure that all redundancy has been eliminated from your code.

Animal Game Click on the picture that matches the word. LION Nope. Try again.

Animal Game Click on the picture that matches the word. RABBIT You got it!

Bonus Point: Select and display only three of the images, at random. Make sure the "target" image is included in the selection!

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution