有没有办法使用 jQuery 或 javascript 全屏浏览器窗口?
我正在设计一个带有 javascript 和 jQuery 前端的 Web 应用程序。对于应用程序来说,接管客户端的整个屏幕是有意义的(不要与浏览器的视口混淆)。本质上,我希望用户能够单击按钮进入全屏模式。 (如果您知道 Netflix 的全屏模式,这就是我正在寻找的功能。)
有人对我如何实现此功能有任何想法吗?
Possible Duplicate:
How to make in Javascript full screen windows (stretching all over the screen)
I am designing a web app with the front-end in javascript and jQuery. It would make sense for the app to take over the client's entire screen (not to be confused with just the browser's viewport). Essentially, I would like the user to be able to click a button to enter into this fullscreen mode. (If you are aware of Netflix's fullscreen mode, that's the functionality I'm looking for.)
Does anybody have any ideas as to how I might implement this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
没办法,何塞!
这是一项防止垃圾邮件和欺骗的安全功能。
由用户决定将浏览器设置为全屏模式。
no way, josé!
This is a security feature to prevent spam and spoofing.
It's up to the user to put his browser in fullscreen mode.
如果无需用户干预就可以实现这一点,那么这将是一个重大的安全问题。 Flash 有一个非常受控制的版本,只能根据用户输入来触发。我想Netflix就是这么用的?
If that were possible without user intervention it would be a major security problem. Flash has a very controlled version of this which is only able to be triggered as a result of user input. I think that is what Netflix uses?
也许是这样的: https://developer.mozilla.org/en/window.resizeTo
Something like this perhaps: https://developer.mozilla.org/en/window.resizeTo
如果可能的话,您会看到这种情况经常发生在侵入性广告中。我们希望这仍然是不可能的。
If this were possible you would see it happen all the time with intrusive advertisements. Let's hope it remains impossible.