WDV221 Intro Javascript
Skill Test - Form Calculations
Sale Price for this purchase:
Total Sales for all purchases: $0.00
Instructions: Modify this page so that the form works as described.
- The customer will select the product using the drop down list. The product price is in the value attribute.
- The Number Purchased field should be a number and should only allow whole numbers.
- When the customer clicks "Submit Order", calculate the Sale Price (product price * number purchased) and display it on the Sale Price line.
- When the customer clicks "Submit Order", the form will add the 'salePrice' to the Total Sales value and display the new value on the Total Sales for all Purchases line.
- All dollar amounts should be formatted as US currency.
- The Reset button should clear the form fields and the 'salePrice' field.
- The Clear Order button should clear the form fields, the 'salePrice', the 'totalSales' and start a new Total Sales.