Question
In JavaScript For this assignment I would like you to make an online store. Decide what you will be selling - two or three items
In JavaScript
For this assignment I would like you to make an online store. Decide what you will be selling - two or three items will be sufficient. Use functions wherever possible.
1. Add prompts to get the buyer's name, phone, and email address (three prompts) . Display this information using document.write in a new window or use an alert. Include a check for the email address. This should prompt the user to re-enter the email address and check the second entry with the first to confirm they are the same. If they are different, output a message to that effect. If they are the same, output the name, phone and email to a small window.
2. Add buttons to select the item required . All items should have different prices, and as yet you don't know how to use if else. However by clicking on the button for a particular item you can set the cost depending on which item they choose. You could put the image on the button , or you could have a button and an image - you would need to let the user know they needed to click a button to say how many they wanted. Then you need to display the item requested, the quantity, and the total price (don't forget the dollar sign).
For each item you sell, have a different price for different features OR have it in different sizes with different prices. For example, an ice cream cone or a sweater can come in different sizes. If your site is a cinema, you could have different prices for matinees. (Basically I want you to be able to handle if/else). Output to a small window.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started