六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 125|回复: 0

利用js实现html页面自动全屏代码

[复制链接]

升级  25.33%

20

主题

20

主题

20

主题

秀才

Rank: 2

积分
88
 楼主| 发表于 2013-2-7 19:28:04 | 显示全部楼层 |阅读模式
<html><script language="JavaScript">top.window.moveTo(0,0);//判断是否为IE浏览器if (document.all) {    top.window.resizeTo(screen.availWidth,screen.availHeight);}//判断是否为Netscape浏览器(document.layers是Netscape 4.x专有的属性,由于//document.layers在Netscape6.0以后已经取消,此方法只适用于6.0之前的浏览器)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><head></head><body></body></html>
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表