Name

Window.focus( ): give keyboard focus to a window — JavaScript 1.1:

Synopsis

window.focus( )

Description

The focus( ) method gives keyboard focus to the browser window specified by the Window object.

On most platforms, a top-level window is brought forward to the top of the window stack so that it becomes visible when it is given focus.

See Also

Window.blur( )

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.