Form JavaScript Tutorial

Syntax

onClick="command"
The onClick event handler is defined in an tag and specifies what to do when a check box is clicked.


    
                   name="peppers"
             onClick="recommendSausage()">Peppers

                   name="sausage">Sausage

      Step 2:
                   value="Order Pizza"
             name="orderButton"
             onClick="alert('ordered.')">