Exercise 1: Given the following HTML Code: Tip Calculator Bill Amount: Tip Percentage: Tip Percentage Total Bill with Tip
Exercise 1: Given the following HTML Code: Tip Calculator Bill Amount: Tip Percentage: Tip Percentage Total Bill with Tip
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter7: String Manipulation
Section: Chapter Questions
Problem 10E
Related questions
Question
Urgent I need the solution
![Exercise 1: Given the following HTML Code:
<h1>Tip Calculator</h1>
Bill Amount:
<input type="number" id="billTotal" onchange="OnValueChange ()">
<br/><br/>Tip Percentage:
<input type="range" id="tipInput" value="0" onchange="OnValueChange()">
<div id="output" style="visibility:hidden">
<br/><br/> Tip Percentage
<input type="text" id="tipAmount" disabled>
<br/><br/> Total Bill with Tip
<input type="text" id="totalBillWithTip" disabled>
</div>
Implement JavaScript OnValueChange() function that will do the
following:
If the bill amount field is ZERO or Below: Show the alert message
"Error: Bill Should be > 0" and hide the output div block.
• If the bill amount contains a valid input, show the output div block and
display tip amount and total bill with tip, as shown in the figure below.
Note that Total Bill with Tip = Bill Total + Bill Total x (Tip Amount/100)
Tip Calculator
Bill Amount: 400.75
Tip Percentage:
Tip Percentage 25%
Total Bill with Tip 500.9375](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fbae81311-78c8-4b30-aecd-4689061ee785%2F8c7730c3-0f8e-4890-91ae-10fce59db731%2Foyu4ql_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Exercise 1: Given the following HTML Code:
<h1>Tip Calculator</h1>
Bill Amount:
<input type="number" id="billTotal" onchange="OnValueChange ()">
<br/><br/>Tip Percentage:
<input type="range" id="tipInput" value="0" onchange="OnValueChange()">
<div id="output" style="visibility:hidden">
<br/><br/> Tip Percentage
<input type="text" id="tipAmount" disabled>
<br/><br/> Total Bill with Tip
<input type="text" id="totalBillWithTip" disabled>
</div>
Implement JavaScript OnValueChange() function that will do the
following:
If the bill amount field is ZERO or Below: Show the alert message
"Error: Bill Should be > 0" and hide the output div block.
• If the bill amount contains a valid input, show the output div block and
display tip amount and total bill with tip, as shown in the figure below.
Note that Total Bill with Tip = Bill Total + Bill Total x (Tip Amount/100)
Tip Calculator
Bill Amount: 400.75
Tip Percentage:
Tip Percentage 25%
Total Bill with Tip 500.9375
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,