[Chapter 21] Reference: Window.focus()
Author: David Flanagan
Date: Fri Aug 29 11:21:08 1997

#

| Chapter 21 JavaScript Reference |

# Window.focus() Method

## Name

Window.focus() Method---give keyboard focus to a top-level window

## Availability

Navigator 3.0

## Synopsis

    window.focus()

### Arguments

None.

### Returns

Nothing.

## Description

The `focus()` method gives keyboard focus to the top-level browser window specified by the Window object. If the Window object is a frame, then keyboard focus is given to the top-level window that contains that frame. On most platforms, a top-level window will be brought forward, to the top of the window stack, when it is given focus.

## See Also

"Window", "Window.blur()"

Window.document |  | Window.frames[]