Javascript examples for Browser Object Model:Window blur
Window blur() Method - Assure that the new window GETS focus and send the new window to the front
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <script> function myFunction() {/*from ww w . j a va 2 s . c om*/ var myWindow = window.open("", "", "width=200,height=100"); myWindow.document.write("<p>A new window!</p>"); myWindow.focus(); } </script> </body> </html>