【问题标题】:How to create a link to trigger the escape key to close the full screen using jquery?如何使用jquery创建一个链接来触发escape键关闭全屏?
【发布时间】:2014-12-24 04:07:50
【问题描述】:

我想创建一个链接来退出全屏,就像我使用 jQuery 单击 Escape 键时一样。如何触发退出键退出全屏?

【问题讨论】:

标签: jquery


【解决方案1】:

在 Gecko (Firefox) 中,您可以使用以下代码

window.document.mozCancelFullScreen();

在 webkit(Chrome 等)中你可以尝试

window.document.webkitCancelFullScreen();

在 Trident (Internet Explorer) 中,希望通过祈祷和一些运气来支持这一点:

window.document.msCancelFullScreen();

有关更多信息,请阅读 MDN https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode 上的这篇文章

【讨论】:

    猜你喜欢
    • 2014-12-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-31
    • 2022-01-22
    • 2011-08-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多