Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How would I complete this via javascript and html? You can keep both parts in same HTML file or separate. It is up to you.

image text in transcribed

How would I complete this via javascript and html?

You can keep both parts in same HTML file or separate. It is up to you. You need to keep your JavaScript as separate file and include that javascript in HTML file. PART A: Ask use to enter Name, mark1 ,mark2 and mark3 using prompt in JavaScript. The HTML page will have para(p tag) with id result. HTML page will also have a button Print Result. On click of the button, printResult() should be called In JavaScript, validate that the marks are numbers and not string. If user enters string then display error in result id that,"you cannot enter string, please refresh the page again" On clicking on Print Result button, call a function printResult() form javascript. you need to find the average of the marks (you may need to use parseInt()-refer page48 week 1 PPT) and print below grades along with name in result id(hint : use document.getElementById) if average >=90 then print "Awesome" if average>=80 then print" very good" if average >=50 then print "OK" if average less than 50 then print Fail PART B: Create 3 buttons in it. In your script tag write 3 different functions for each button click. These 3 button should represent 3 different festival. For eg: Halloween, Christmas, new year. You can change it to your favorite festival. On button click a function should be called, this function should display the image of the festival and 2 to 3 lines of information of the festival

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions

Question

What information does inventory turnover provide?

Answered: 1 week ago