Chapter 9: Handling Events

Return to Chapter 9


To use this script on your own page, click in the text area below, select all, and copy to grab the script. Then, just paste into your own page — and you're done.

Form Event Handling: onblur

See it run: Form Event Handling: onblur

Script 9.15

This HTML create a simple form for use with the onblur event.

Script 9.16

The onblur handler can be used in forms to trigger actions when the user leaves a field, as with this JavaScript.