Previous Example-|-Next Example-|-Return to Chapter Listing
Example 12.8:
onsubmit: Form Validation
This form uses the onsubmit event handler to verify the form entry. Note, however, that if you enter something beginning with text instead of a number, you'll get an error message. Or if you enter a number followed by text, the text is ignored. We'll see how to fix those problems later.
These are the scripts we used. First, in the HEAD:
Then we created this form:
Previous Example-|-Next Example-|-Return to Chapter Listing