-
Js点击全屏的代码,IE下有问题,最好在火狐、Google浏览器下浏览,点击文字即可实现全屏效果,你最好是在页面上放置一个按钮,点击此按钮实现全屏功能。
-
<html>
-
<head>
-
<title>Js点击实现全屏的代码</title>
-
<script language=\"javascript\" type=\"text/javascript\">
-
function openWin()
-
{
-
setTimeout(\"RunScript()\",1000);
-
}
-
function RunScript()
-
{
-
x.DOM.Script.execScript(shellscript.toString());
-
x.DOM.Script.setTimeout(\"shellscript()\");
-
}
-
function shellscript(){
-
open(\"/index.html\",\"\",\"fullscreen=yes\");
-
}
-
</script>
-
</head>
-
<body>
-
<object id=\"x\" classid=\"clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A\" width=\"0\" height=\"0\" align=\"middle\">
-
<PARAM NAME=\"ActivateApplets\" VALUE=\"1\">
-
<PARAM NAME=\"ActivateActiveXControls\" VALUE=\"1\">
-
</object>
-
<a href=\"javascript:openWin();\">点击全屏</a>
-
</body>
-
</html>
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29737856/viewspace-1222596/
,如需转载,请注明出处,否则将追究法律责任。