How to use Window Object Blur in JavaScript

In this article I am going to explain about window object blur() method in JavaScript.
  • 2383

JavaScript Window Object Blur() Method

JavaScript blur() method use for open new window and remove focus from current window.

Syntax

 

Window.blur()

Example

<html>

<head>

    <script type="text/javascript">

        function myfun() {

            MyWin = window.open('', '', 'width=250,height=100');

            MyWin.document.write("new window");

            MyWin.blur();

        }

    </script>

</head>

<body>

    <button onclick="myfun()">

        click me</button>

</body>

</html>

 

Output


blur.gif

 

You may also want to read these related articles: here
 
Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.