需要在页面加载时全屏显示托管的html页面 [英] Need to display hosted html page in full screen on page load
问题描述
我正在开发GWT Web应用程序,并且出于特定要求,我需要在加载时全屏显示我唯一的托管html页面. 这是通过在任何网页上按F11来完成的.我的GWT应用程序需要完全相同的功能.
I am developing a GWT web application and for a specific requirement I need to display my only hosted html page in full screen on load. This we done with the help of pressing F11 on any web page. I need exactly the same functionality in my GWT application.
为此,我尝试了一下Javascript,但这是行不通的.
I have tried glimpses of Javascript for this which wasn't worked.
<script language="JavaScript1.2">
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById)
{
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
</script>
有可能吗?
推荐答案
您不能强迫用户选择如何显示您的文档.仍然有一个草稿以获取全屏api ,请参见还 https://developer.mozilla.org/en/DOM/Using_full-screen_mode
You can't force the user on how to display your document. Still, there's a Draft for a fullscreen api, see also https://developer.mozilla.org/en/DOM/Using_full-screen_mode
这篇关于需要在页面加载时全屏显示托管的html页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!