Question: Part 1. (20 points) Chapter 6 Based on examples in this chapter (all the code of this example can be downloaded from the book site

Part 1. (20 points) Chapter 6 Based on examples in this chapter (all the code of this example can be downloaded from the book site as usual), write an HTML with JavaScript (and probably image files or CSS) that achieve the following requirements. Requirements: 1. The page should have 5 input spaces that can accept 5 different numbers. 2. When you click in one of the 5 inputs, the background color of the other 4 inputs should change to grey. At the same time, a prompt should show up under this array of input spaces and print You are entering the 2nd number (Similar to focus-blur example). Replace the 2nd with the actual position of the current input. 3. A switch button similar to the microphone button in example.html should be implemented. The button should switch between + (addition) sign and * (multiplication) sign when clicked. You may find the images of the signs online. 4. Under the array of number inputs, there should be a submit button. When the switch sign is + and user clicked on submit, the sum of all the five numbers should be displayed somewhere on the page. When the switch sign is *, the result of the 5 numbers multiplied together should be shown.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!