Window.onblur (Property)

This is called when the window loses input focus.

Availability:

JavaScript - 1.1
JScript - 3.0
Internet Explorer - 4.0
Netscape - 3.0
Opera - 3.0
Property/method value type:Function object
JavaScript syntax:-myWindow.onblur
-myWindow.onblur = aHandler
-onblur
-onblur = aHandler
HTML syntax:<BODY onBlur="aHandler"> <FRAMESET onBlur="aHandler">
Argument list:aHandlerAn event handler function object

A blur event is caused by the user clicking on another window or frame or the window.blur() method being called. When this event is triggered, an onblur event handler will be invoked.

The onblur event handler is a function which is represented by an object that is referred to by this property. Because it is stored in a property, you can change the handler by storing a reference to a different function object in this property. At least, you can on MSIE.

You cannot redefine the value of the window.onblur property from inside the onblur function handler. This means you can't modify the onblur behavior while a blur event is in progress.

The handler is registered either by assigning a function to the onblur property or by defining it with an HTML tag attribute.

Warnings:

See also:onBlur, Window.blur(), Window.focus(), Window.onfocus

Property attributes:

DontEnum.