Window blur() Method
- Previous Page atob()
- Next Page btoa()
- Go to the Previous Level Window Object
Definition and Usage
blur()
The method removes the focus from the window.
focus()
The method sets the focus to the window.
Note:blur()
The method sends a request to put the window in the background. Due to different user settings, it may not work as expected.
See also:
Instance
Example 1
Open a new window and blur the focus:
const myWindow = window.open("", "", "width=200, height=100"); myWindow.blur();
Example 2
Open a new window and set the focus:
const myWindow = window.open("", "", "width=200, height=100"); myWindow.focus();
Syntax
window.blur()
Parameter
None.
Return Value
None.
Browser Support
All Browsers Support blur()
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support | Support |
- Previous Page atob()
- Next Page btoa()
- Go to the Previous Level Window Object