Window blur()Method
Window Object
Definition and Usage
The blur() method removes keyboard focus from the top-level window.
Syntax
window.blur()
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the blur() method, except Opera.
Example
Example
Ensure the new window does not get focus (sends the new window to the background):
<html>
<head>
<script>
function openWin()
{
myWindow=window.open('','','width=200,height=100');
myWindow.document.write("<p>The new window.</p>");
myWindow.blur();
}
</script>
</head>
<body>
<input type="button" value="Open window" onclick="openWin()">
</body>
</html>
<head>
<script>
function openWin()
{
myWindow=window.open('','','width=200,height=100');
myWindow.document.write("<p>The new window.</p>");
myWindow.blur();
}
</script>
</head>
<body>
<input type="button" value="Open window" onclick="openWin()">
</body>
</html>
Try it Yourself »
More Examples
Ensure the new window gets focus
Window Object Other Extensions