javascript window.open 在第二台显示器上打开
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21672094/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
window.open on second monitor
提问by boi_echos
window.open('branchMonitoring/', 'Testing Dual Monitor', 'resizable=1, scrollbars=1, fullscreen=0, height=200, width=650, screenX=0 , left=1280, toolbar=0, menubar=0, status=1');
I used this code to open a new window on second monitor but the new window still opens on first monitor and cannot exceed the first monitor's boundary. I tried to change "left" to a higher value but still no luck.
我使用此代码在第二台显示器上打开一个新窗口,但新窗口仍会在第一台显示器上打开并且不能超出第一台显示器的边界。我试图将“左”更改为更高的值,但仍然没有运气。
Please help me brothers. i am using latest google chrome browser and using windows 8 dual monitor.
请兄弟们帮帮我。我正在使用最新的 google chrome 浏览器和 windows 8 双显示器。
Please do note that this solution works for me when using FireFox browser. But I need to get it work on chrome.
请注意,使用 FireFox 浏览器时,此解决方案对我有用。但我需要让它在 chrome 上工作。
采纳答案by boi_echos
After doing many researches, I found some remedy. Some are saying that this is a bug on chrome.
在做了很多研究之后,我找到了一些补救措施。有人说这是 chrome 上的一个错误。
please refer too this link. https://stackoverflow.com/a/17972796/2276894
请参考此链接。 https://stackoverflow.com/a/17972796/2276894
And also if you are targeting to create an admin/internal application, you can try Chrome App. It offers functions like, window.create()
with position parameters. You can control the position of the windows you created. Remember that you have to install the Chrome Appyou created in user's browser, just like in extensions.
此外,如果您的目标是创建管理/内部应用程序,您可以尝试Chrome App。它提供诸如window.create()
位置参数之类的功能。您可以控制您创建的窗口的位置。请记住,您必须安装在用户浏览器中创建的Chrome 应用程序,就像在扩展程序中一样。