Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In JAVASCRIPT create an event listener . All your code will be inside that event listener. PLEASE do NOT deviate from assignment. Follow specific instructions.

In JAVASCRIPT create an event listener. All your code will be inside that event listener. PLEASE do NOT deviate from assignment. Follow specific instructions. thank you //create an click event listener called isValidButton //inside the event listener set undefined variables for isValidMsg and getInput. You can leave them undefined because we'll use them later. //set isValidMsg to equal the isValidMsg id in your HTML //output isValidMsg to HTML and set it to an empty string //set getInput to take in the value of isValidInput (which matches the id of your input in your HTML) //create a try statement //if getInput is empty, then throw the string "is empty" //if getInput is not a number, then throw the string "is not a number" //if getInput is greater than 15, then throw the string "is too high" //if getInput is less than 12, then throw the string "is too low" //open your catch statement //output isValidMsg to HTML and output a string of "Input" and add the error message //open your finally statement //create an alert that says "This will always run."

HTML and CSS is as follows - DO NOT ADJUST

*******HTML*******

Project 13

*******CSS*******

*{ box-sizing: border-box; }

body{ font-family: sans-serif; min-height: 100%; overflow-y: hidden; }

.text-center{ text-align: center; }

.container{ display: flex; justify-content: center; align-items: center; height: 100vh; flex-direction: column; }

#test-input{ flex-direction: row; }

input,button{ padding: 10px; font-size: 18px;}

#isValidMsg{ color: red; margin: 1em; font-style: italic; font-weight: bold;}

thank you

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 Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

LO6 List the components of job descriptions.

Answered: 1 week ago

Question

LO3 Define job design and identify common approaches to job design.

Answered: 1 week ago