全屏浏览器窗口(如F11) [英] Full Screen Browser window (Like F11)
本文介绍了全屏浏览器窗口(如F11)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建一个Web应用程序.如何将浏览器从普通模式更改为全屏模式(例如 F11 ),但是我不想为此打开弹出窗口.我想将同一窗口转换为全屏模式.
I am creating a web application. How do I change the browser from normal mode to fullscreen mode (like F11), but I don't want to open a popup for this. I want to convert the same window to fullscreen mode.
要求是:页面上有一个按钮,并且是一个将普通模式更改为全屏模式并将全屏模式更改为普通模式的切换按钮
The requirement is: there is a button on the page, and it's a toggle button for changing normal mode to fullscreen mode and fullscreen mode to normal mode
推荐答案
在下面尝试此javascript代码.
Try this javascript code below.
<script>
function fullScreenMode(url) {
window.open(url, '', 'fullscreen=yes, scrollbars=auto');
}
</script>
这篇关于全屏浏览器窗口(如F11)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文