How to set focus to the current window in JavaScript

1 Answer

0 votes
var myWindow = window.open("", "", "width=300, height=200");
myWindow.document.write("<p>JavaScript</p>");         

myWindow.focus();                                 



/*
run:
 

 
*/

 



answered May 4, 2017 by avibootz

Related questions

...