Hands-On Project 1-3 In this project, you will explore how to write text to a specific element in your web page in response to the onclick event handler. To complete the exercise, you will apply the following JavaScript expression: document.getElementById('id').innerHTML = 'text'; where id is the value of the id attribute for the page element and text is the text of the content to be written into the element. You will use this expression to enhance a web form by displaying the message “Thank you for your order” when the user clicks the Submit button. Figure 1-25 shows the completed web page. Do the following: 1. Use your code editor to open project01-03_txt.html from the HandsOnProject_01 folder. Enter your name and the date in the comment section of the document and save it as project01-03.html. 2. Scroll down to the bottom of the file and locate the input element for the Submit button. 3. Add an onclick event handler to the tag that changes the innerHTML value of the page element with the id “submitMsg” to the text message Thank you for your order. (Note: The entire JavaScript expression should be enclosed within a set of double quotation marks, but the id and the text message should be enclosed within single quotes.) 4. Save your changes to the file and then open project01-03.html in your web browser. Click the Submit button and verify that the text “Thank you for your order” appears on the bottom of the page.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Hands-On Project 1-3
In this project, you will explore how to write text to a specific element in your web page in response to the
onclick event handler. To complete the exercise, you will apply the following JavaScript expression:
document.getElementById('id').innerHTML = 'text';
where id is the value of the id attribute for the page element and text is the text of the content to be written
into the element. You will use this expression to enhance a web form by displaying the message “Thank you for
your order” when the user clicks the Submit button. Figure 1-25 shows the completed web page.
Do the following:
1. Use your code editor to open project01-03_txt.html from the HandsOnProject_01 folder. Enter your name and the date in the comment section of the document and save it as project01-03.html.
2. Scroll down to the bottom of the file and locate the input element for the Submit button.
3. Add an onclick event handler to the <input> tag that changes the innerHTML value of the page element with the id “submitMsg” to the text message Thank you for your order. (Note: The entire JavaScript expression should be enclosed within a set of double quotation marks, but the id and the text message should be enclosed within single quotes.)
4. Save your changes to the file and then open project01-03.html in your web browser. Click the Submit button and verify that the text “Thank you for your order” appears on the bottom of the page.

Hands-on Project 1-3
Order Form
Contact Information
Name
Email
Phone
Reservation Information
-Pickup date-
January
2022
Figure 1-25 Completed Project 1-3
-Dropoff date
January
Submit
Thank you for your order
2022
Transcribed Image Text:Hands-on Project 1-3 Order Form Contact Information Name Email Phone Reservation Information -Pickup date- January 2022 Figure 1-25 Completed Project 1-3 -Dropoff date January Submit Thank you for your order 2022
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 8 steps with 6 images

Blurred answer
Knowledge Booster
JQuery and Javascript
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education