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