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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started