在第二台显示器上打开新的浏览器页面
嗯,简单的情况。 是否可以通过 Web 应用程序检测用户是否具有双显示器设置? 如果可能的话,是否可以在第二台显示器上打开子浏览器页面,以便新窗口不会与旧窗口重叠?
我问的原因是:我正在开发一个网络应用程序,并且家里有一个双显示器系统。 当我转到该网站的管理部分时,我希望它在新浏览器中打开,最好是在另一个桌面上。 当然,我可以直接单击,然后拖动新窗口,但自动执行此操作似乎更有趣。 :-)
认为 JavaScript 没有适当的函数来实现这一点。 Java 本身怎么样?
Well, simple situation. Is it possible to detect if a user has a dual monitor setup from a web application?
If this is possible, is it possible to open a child browser page on this second monitor, so the new window doesn't overlap the old one?
Reason why I ask: I'm working on a web application and at home I have a dual-monitor system. When I go to the administration part of this site, I want it to open in a new browser, preferably on the other desktop. Of course, I could just click, then drag the new window, but doing this automatically seems more fun. :-)
Don't think JavaScript has the proper functions for this. How about Java itself?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您无法直接检测双显示器设置,但您可以通过使用 javascript 的 screen.width 和 screen.height 查看其屏幕分辨率来做出很好的猜测。 如果宽度与高度的比例为 8:3,则很可能他们并排有 2 个标准 4:3 显示器。 您可以对 16:9 或 16:10 进行类似的计算。
I don't think you'll be able to directly detect a dual monitor setup, but you can probably make a good guess by looking at their screen resolution, using javascript's screen.width and screen.height. If the ratio of the width to the height is 8:3, its a good chance they have 2 standard 4:3 monitors side by side. You can do a similar calculation for 16:9 or 16:10.
使用 maxpower47 关于分辨率的建议,在另一台显示器上显示页面的唯一方法是打开一个弹出窗口,并使用选项设置顶部、右侧、宽度和高度属性,以便窗口将以大小合适。
以下链接描述了如何执行此操作: http://www.netmechanic.com /news/vol4/javascript_no7.htm
Using maxpower47's suggestion about resolution, the only way to display the page on the other monitor would be to open a popup, and use the options to set the top, right, width and height properties so the window will appear on the second monitor in a decent size.
Here is a link that describes how to do this: http://www.netmechanic.com/news/vol4/javascript_no7.htm