获取监视器计数

编程入门 行业动态 更新时间:2024-10-21 23:24:49
本文介绍了获取监视器计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个Web应用程序,我想实现以下行为。

I have a web application that I'd like to implement the following behavior.

当您点击特定链接时:

  • 如果用户有多个监视器 - 在具有给定名称的窗口中打开URL。

  • If the user has more than one monitor - open the url in a window with a given name.

否则 - 将iframe的src属性更改为url属性。

Otherwise - change the iframe's src attribute to that of the url.

如何做我在JavaScript中检测到了显示器数量?

如果不可能,那么仅限Chrome的解决方案也适用于Intranet应用程序。

If it's impossible, a Chrome only solution would also work since this is for an intranet app.

推荐答案

正如其他人所说,唯一明智的做法是询问用户。之前提出并拒绝了允许这种做法的提案。多显示器设置在一般人群中并不常见,这就是为什么会被忽略的原因。

As others have said the only sensible way to do this is to ask the user. A proposal to allow this has been raised and declined before. Multi monitor setups are not very common in the general population which is why this is ignored.

替代方案是:

  • 提示用户。
  • 要求用户运行浏览器扩展程序(不那么有趣,风险更大)。
  • 通过插件运行(也不是很有趣)。
  • 通过类似WebkitJS的方式提供您的应用程序
  • Prompt the user.
  • Ask the user to run a browser extension (less fun and more risky).
  • Run through a plugin (also not very fun).
  • Serve your app through something like WebkitJS

总体而言 - 对于普通网站,唯一的选择是提示用户。

Overall - for normal websites the only option is to prompt the user.

更多推荐

获取监视器计数

本文发布于:2023-11-11 06:12:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577593.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:监视器

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!