Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Develop- test- and validate an HTML document that has checkboxes for a.docx

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige

Hier ansehen

1 von 1 Anzeige

Develop- test- and validate an HTML document that has checkboxes for a.docx

Herunterladen, um offline zu lesen

Develop, test, and validate an HTML document that has checkboxes for apple ( 59 cents each), orange ( 49 cents each), and banana ( 39 cents each), along with a button. Each of the checkboxes should have its own onclick event handler. These handlers must add the cost of their fruit to a total cost. An event handler for the button must produce an alert window with the message , where is the total cost of the chosen fruit, including 5 percent sales tax. This handler must return false ( to avoid actual submission of the form data).
Solution

Top of Form
Bottom of Form
Apples Bananas Oranges // total.js // This script illustrates using the focus event // to prevent the user from changing a text field var totalCost = 0; function total() { //Which buttons are checked plus costs var dom = document.getElementById(\"myForm\"); for(var index = 0; index
.

Develop, test, and validate an HTML document that has checkboxes for apple ( 59 cents each), orange ( 49 cents each), and banana ( 39 cents each), along with a button. Each of the checkboxes should have its own onclick event handler. These handlers must add the cost of their fruit to a total cost. An event handler for the button must produce an alert window with the message , where is the total cost of the chosen fruit, including 5 percent sales tax. This handler must return false ( to avoid actual submission of the form data).
Solution

Top of Form
Bottom of Form
Apples Bananas Oranges // total.js // This script illustrates using the focus event // to prevent the user from changing a text field var totalCost = 0; function total() { //Which buttons are checked plus costs var dom = document.getElementById(\"myForm\"); for(var index = 0; index
.

Anzeige
Anzeige

Weitere Verwandte Inhalte

Weitere von rtodd615 (20)

Aktuellste (20)

Anzeige

Develop- test- and validate an HTML document that has checkboxes for a.docx

  1. 1. Develop, test, and validate an HTML document that has checkboxes for apple ( 59 cents each), orange ( 49 cents each), and banana ( 39 cents each), along with a button. Each of the checkboxes should have its own onclick event handler. These handlers must add the cost of their fruit to a total cost. An event handler for the button must produce an alert window with the message , where is the total cost of the chosen fruit, including 5 percent sales tax. This handler must return false ( to avoid actual submission of the form data). Solution Apples Bananas Oranges // total.js // This script illustrates using the focus event // to prevent the user from changing a text field var totalCost = 0; function total() { //Which buttons are checked plus costs var dom = document.getElementById("myForm"); for(var index = 0; index

×