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.

Handling Window Events: onblur

See it run: Handling Window Events: onblur

Script 9.8

This JavaScript uses onblur to keep a window in the front (active) position.