Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a button labeled Enter new ID Create a div container with an id of your choice to display youroutput from JavaScript. Create a JavaScript

Create a button labeled “Enter new ID”

Create a div container with an id of your choice to display youroutput from JavaScript.

Create a JavaScript file

a. Add click event to the button (Enter new ID) sothat invokes a function each time it is clicked. Your functionshould perform following operations:

? prompts user to enter a GBLearn ID. You will need to useRegExp inside try & catch block to evaluatewhether the id is in a proper format, if not, throw an error todisplay alert message to user in your catch block). As you know,all GBLearn IDs begin with a lowercase letter for each season (wfor winter, s for summer...), followed by 7 digits. Ifuser input is in a valid format, create a new h3 elementand embed user’s input as a new text node to theh3 element, then append it to the div container created above(in your HTML document).

Step by Step Solution

3.43 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

Answer and step by step explanation HTML Enter new ID JavaScript get the elements const enterIDButto... 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

Systems analysis and design

Authors: kenneth e. kendall, julie e. kendall

8th Edition

135094909, 013608916X, 9780135094907, 978-0136089162

More Books

Students also viewed these Electrical Engineering questions

Question

Why is the national security argument for tariffs questionable?

Answered: 1 week ago

Question

What is meant by team process?

Answered: 1 week ago