<SCRIPT language=Javascript1.2 type=text/javascript><!--
function addbook(){
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)>
<span style="cursor: hand;" onclick=fullme(event)>全屏切换(点击)</span>
<object id=hh1 
classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"> 
<param name="Command" value="Minimize">
</object>

解决方案 »

  1.   

    我试过了你的代码,但还是没有成功-------------
    进入系统时,我用下面语句实现全屏
    window.open('Index.aspx','','fullscreen=yes')注销时,再调用window.top.moveTo(0,0);
    window.top.resizeTo(screen.availWidth,screen.availHeight);
    window.toolbar.visible=true;
    window.statusbar.visible=true;
    window.menubar.visible=true;还是没有用,一样是全屏界面
      

  2.   

    没办法恢复的,除非window.close或Alt+F4关闭窗口