Javascript Window Blur() and Window Focus() Method (original) (raw)

Last Updated : 11 Jul, 2025

JavaScript provides various methods to manipulate browser windows, two of which are window.blur() and window.focus(). These methods are particularly useful when managing the user interface and enhancing the user experience by controlling window focus.

Javascript Window Blur()

Javascript **Window Blur() method is used to remove focus from the current window. i.e, It sends the new open Window to the background.

**Syntax:

Window.blur()

**Parameter: It does not require any parameters.

**Return Value: It does not return any value.

**Below examples illustrate the window.blur() method of JavaScript:

**Example: The below example illustrates the window.blur() method in JavaScript:

HTML `

window.blur() method of JavaScript

GeeksforGeeks

JavaScript window.focus() Method