August 1999
Intermediate to advanced
1488 pages
72h 53m
English
onFocus="command"
The onFocus event handler is defined in an <input> tag and specifies what to do when a check box gains focus.
The code in Listing 7.46 uses the onFocus event handler to automatically select extra cheese when the customer selects sausage.
<html> <h2>Pizza Machine</h2> Step1: Please select your pizza toppings:<BR> <form name="orderForm"> <input type="checkbox" name="peppers">Peppers<br> <input type="checkbox" name="sausage" onFocus="chooseExtraCheese()">Sausage<br> <input type="checkbox" name="cheese">Extra Cheese<hr> Step 2: <input type="button" value="Order Pizza" ... |
Read now
Unlock full access