如何控制弹出窗口的大小?
我使用下面的js从原来的窗口弹出一个新窗口:
oWin = window.open("PServlet?module=LoginHandler","_blank",
"directories=no,location=no,menubar=no,resizable=yes,status=yes,titlebar=yes,toolbar=no",
false);
正如你所看到的,我没有设置新窗口的大小或位置,但我的测试结果是每次弹出窗口的大小是从原始窗口的相同大小不规则地显示,有时是一半,有时是全屏或部分大小。
大家知道什么是道理吗? 如果我不改JS,如何才能让弹窗每次都全屏显示呢?
I used the following js to pop-up a new window from original window:
oWin = window.open("PServlet?module=LoginHandler","_blank",
"directories=no,location=no,menubar=no,resizable=yes,status=yes,titlebar=yes,toolbar=no",
false);
As you can see, I did not set the size or location of new window, But my test results is that the size of pop-up windows on every time was shown irregularly from the same size of original window, sometimes it is half, sometime it is full screen or partial size.
Everybody know what is reason?
If I wouldn't change the JS, how can I let the pop-up window to be displayed in full screen in every times.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://www.javascript-coder.com/window-popup /javascript-window-open.phtml
对于全屏,请参见此处:http://javascript-array.com/scripts/window_open/
http://www.javascript-coder.com/window-popup/javascript-window-open.phtml
For fullscreen, see here: http://javascript-array.com/scripts/window_open/