[英]Need to display hosted html page in full screen on page load
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. 我正在开发GWT Web应用程序,并且出于特定要求,我需要在加载时全屏显示我唯一的托管html页面。 This we done with the help of pressing F11 on any web page.
这是通过在任何网页上按F11来完成的。 I need exactly the same functionality in my GWT application.
我在GWT应用程序中需要完全相同的功能。
I have tried glimpses of Javascript for this which wasn't worked. 我已经尝试过浏览一下Javascript,但是没有用。
<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>
Could it be possible? 有可能吗
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
仍然有全屏api的草案 ,另请参见https://developer.mozilla.org/en/DOM/Using_full-screen_mode
I think you will need to use the page you load to launch a new browser window with the fullpage html in it. 我认为您将需要使用加载的页面来启动带有全页html的新浏览器窗口。 The first page is nothing but to kick off the full page with a script like this
第一页就是用这样的脚本开始整页的内容
<script>
<!--
window.open("fullpage.html","fs","fullscreen=yes")
//-->
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.