南洋理工大学占地面积:如何使网页自动最大化(全屏)

来源:百度文库 编辑:神马品牌网 时间:2024/04/30 13:57:19
最大化的意思就是网页什么工具条都没有,只有网页内容顶四边.该怎么写?
也不是按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[1]=window.statusbar.visible;
old[2]=window.menubar.visible;
window.toolbar.visible=false;
window.statusbar.visible=false;
window.menubar.visible=false;
}
mode=1;
}else{
if(typeof document.all!='undefined'){
top.moveTo(0,0);
top.resizeTo(screen.availWidth,screen.availHeight);
}else{
window.toolbar.visible=old[0];
window.statusbar.visible=old[1];
window.menubar.visible=old[2];
}
mode=0;
}
return true;
}
--></SCRIPT>
<body scroll=no onload=fullme(event)>
<A onclick=fullme(event)>全屏切换(点击)</A>
</body>
</html>

把如下代码加入<body>区域中

<form> <div align="center"> <input type="BUTTON" name="FullScreen" value="全屏显示" onClick="window.open(document.location, 'big', 'fullscreen=yes')"> </div> </form>

这是本页全屏效果,你可以自己测试一下

在IE浏览器的菜单“查看”--“工具栏”
把所有的勾勾都去掉!!

我有这样的代码,我做的是一个触摸屏系统用的,而且只能通过密码关闭,不可以ctrl+del+alt

你是说找码呀

F11