How to show fullscreen popup window in javascript?

前端 未结 5 1757
被撕碎了的回忆
被撕碎了的回忆 2020-12-03 06:21

Is there a way to make a popup window maximised as soon as it is opened? If not that, at least make it screen-sized? This:

window.open(src, \'newWin\', \'ful         


        
5条回答
  •  攒了一身酷
    2020-12-03 06:59

    What about this:

    var popup = window.open(URL);
    if (popup == null)
       alert('Please change your popup settings');
    else  {
      popup.moveTo(0, 0);
      popup.resizeTo(screen.width, screen.height);
    }
    

提交回复
热议问题