From the course: JavaScript for Web Designers
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Add and use more fields - JavaScript Tutorial
From the course: JavaScript for Web Designers
Challenge: Add and use more fields
(soft intriguing music) - [Instructor] Now it's time for a challenge. We're going to respond to some changes for H+ Sport. For one thing, they've opened up a new store in Washington state. Yay for them, but we need to update our shipping estimator to account for the fact that they need to charge state sales tax for Washington, which is 6 1/2% for our purposes. Also, they're selling a new product: H+ Sport mineral water. It's fizzy, it also sells for $4.00 a bottle. We're going to need to update both the HTML and the JavaScript for this challenge. I recommend maintaining a similar HTML structure to what's already there with classes and IDs to make sure the styling stays consistent when you load it in the browser. You'll be adding a new tax factor and updating the calculations based on all that new stuff. This challenge should take about five or 10 minutes to complete. Good luck.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Working with user info4m 44s
-
Text fields and select boxes5m 45s
-
(Locked)
Radio buttons and checkboxes5m 30s
-
(Locked)
Changing submission with events4m 21s
-
(Locked)
Starting to validate input4m 15s
-
(Locked)
Disabling and enabling fields5m 14s
-
(Locked)
The basics of sanitizing user input7m 1s
-
(Locked)
Get and set with innerHTML6m 58s
-
(Locked)
Challenge: Add and use more fields56s
-
(Locked)
Solution: Add and use more fields3m 23s
-
(Locked)
-
-
-
-