Window.blur() (Method)

Send a blur event to the window object.

Availability:

DOM level - 1
JavaScript - 1.1
JScript - 3.0
Internet Explorer - 4.0
Netscape - 3.0
Opera - 3.0
Property/method value type:undefined
JavaScript syntax:-blur()
-myWindow.blur()

This will take the input focus away from the receiving window, usually the one at the top of the window hierarchy. On some platforms, this will also make the window inactive and may put it to the back of the window hierarchy.

There are good arguments for using the focus() method on another window rather than the blur() method. Removing focus from a window should make it safe from inadvertent mouse clicks at the expense of making the window inactive altogether, which could be frustrating for the user.

Warnings:

See also:Frame object, Input.blur(), Input.focus(), Window object, Window.focus(), Window.onblur, Window.onfocus