Hidden window using javascript

前端 未结 3 660
广开言路
广开言路 2020-12-29 10:16

Just wanted to know if it is possible to create a hidden window using javascript?

3条回答
  •  猫巷女王i
    2020-12-29 10:45

    Under IE 9+ you can create a window off-screen:

    var options = "left=" + (screen.width*2) + ",top=0";
    var myWin = window.open(url, name, options);
    // Hide the window - IE only
    myWin.blur();
    // Show the window - IE only
    myWin.focus();
    

    screen.width is your monitor width. Using "*2" allows for users with dual monitors.

    This does not work under Chrome.

提交回复
热议问题