如何使网页自动最大化(全屏)

来源:百度知道 编辑:UC知道 时间:2024/05/11 19:10:27
最大化的意思就是网页什么工具条都没有,只有网页内容顶四边.该怎么写?
也不是按F11那种效果,而是满屏!不知道哪位能写这样的代码?而且是只能自动满屏显示,不用点击,能提供者加高分

<html>
<head>
<title>网页特效|Linkweb.cn/Js|---点击进行全屏切换</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<SCRIPT language=Javascript1.2 type=text/javascript><!--
function addbookmark(){
alert("IE only")}
var mode=0
var old=new Array();
function fullme(e){
if(mode==0){
if(typeof document.all!='undefined'){
if(top.document.body.offsetWidth==screen.availWidth){
alert("信息提示:你的浏览器已被锁定视窗最大化,无法启用全屏模式!");
e.returnValue=false;
return false;
}
top.moveBy(e.clientX-e.screenX,e.clientY-e.screenY);
top.resizeBy(screen.availWidth-top.document.body.offsetWidth,
screen.availHeight-top.document.body.offsetHeight);
}else{
window.top.moveTo(0,0);
window.top.resizeTo(screen.availWidth,screen.availHeight);
old[0]=window.toolbar.visible;
old