Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

DOCTYPE html html langen head meta charsetUTF8 meta nameviewport contentwidthdevicewidth initialscale10 title Grade Calculator title style result colo... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Programming Logic & Design Comprehensive

Authors: Joyce Farrell

9th edition

978-1337102070

More Books

Students also viewed these Programming questions

Question

What is Larmors formula? Explain with a suitable example.

Answered: 1 week ago