Question: Write a complete JavaScript program to prompt the user for 4 grades of tests out of 25 then call a function FindTotal to calculate and

 

Write a complete JavaScript program to prompt the user for 4 grades of tests out of 25

then call a function FindTotal to calculate and display the total

The user should enter the inputs in an HTML5 input element of type "number" in a form.

Give the input elements the id value for example "inputField". You can use this id with The document object’s

getElementById method to get the elements for use in the script.

When the user clicks on the button "Find Total" the result should be printed under it with the following requirements:

The total should be bold and blue if it is greater than 60 and Red if it is less.

Moreover, a picture will be shown based on the grade if it is greater than 60 picture "Good" will be shown,

and "workHard" if it is less.

Resize the pictures to be both the same height and width.

Note : write your name, id, and section under the result in purple color.

 

Step by Step Solution

3.42 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

DOCTYPE html html langen head meta charsetUTF8 meta nameviewport contentwidthdevicewidth initialscale10 title Grade Calculator title style result colo... View full answer

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 Programming Questions!