Adapted from: Robert W. Sebasta, Programming the World-Wide Web, 3rd Edition, Addison Wesley, 2006. Supporting: Contact Hour 13.
onclick
event handler. These handlers must add the cost of their fruit to the total cost. An event handler for the Submit button must produce an alert window with the message "Your total cost is xxx p,"
where xxx
is the total cost of the chosen fruit plus 17.5 percent VAT. This handler must return false
(to avoid actual submission of the form data).