js实现自动全屏幕



第一种:
<script>
window.open('index.htm','','fullscreen=yes')
</script>

第二种:下面是 start.htm 页面


<script language="javascript">

//设置打开地址
url = "show.htm";

var w=window.screen.availWidth;
var h=window.screen.availHeight;
//win1 = NewWin(url,"","left=0,top=0,height="+ h +",width="+ w +",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no");

function NewWin(url,winName,vars){
     window.open(url,winName,vars);
}

function loadFullscreen()
{
   //obj=document.getElementById("goLink1");
   document.getElementById("goLink1").click();//模拟点击的链接
}

</script>

<body bgcolor="#E8F7FF" onload="loadFullscreen()">
  <a id="goLink1" href='javascript:NewWin(url,"","left=0,top=0,height="+ h +",width="+ w +",status=0,toolbar=0,fullscreen=1,menubar=0,location=0,scrollbars=0,resizable=0,false");'><br><br><br><br><center><b><font color="#ff3333">[打开全屏窗口]</font></b></center></a>
</body>

 


下面是 show.htm 页面,将滚动条屏蔽,有时候也需要将右键和键盘屏蔽掉,自己动手吧


<style>
body{
overflow-y : hidden;
}
</style>

<body bgcolor="#A6D5FB">
展示的内容。。。
</body>

posted on 2006-12-22 12:34  asdsd  阅读(4102)  评论(0编辑  收藏  举报

导航