window.fullScreen = true不起作用 [英] window.fullScreen=true is not working
本文介绍了window.fullScreen = true不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想以全屏模式打开我的html页面。我尝试在body的onload事件处理函数中执行这个javascript。
I would like to open my html page in fullscreen mode. I tried to execute this javascript in body's onload event handler.
window.fullScreen = true;
但不幸的是,这似乎并不奏效。有没有其他方法可以达到同样的效果。
But unfortunately that doesn't seem to be working. Is there any other way with which we can achieve the same.
推荐答案
我不认为你可以通过使用onload事件。尝试在打开窗口时设置属性。这应该工作...
I dont think you can set the windows properties by using the onload event. Try setting the properties as you open the window. This should work...
<div onclick="window.open('http://stackoverflow.com', 'Stackoverflow' , 'type=fullWindow, fullscreen, scrollbars=yes');">
Hello Stackoverflow!
</div>
这篇关于window.fullScreen = true不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文