当前位置: 代码迷 >> JavaScript >> JS整合弹出窗口大小
  详细解决方案

JS整合弹出窗口大小

热度:74   发布时间:2012-08-27 21:21:57.0
JS调整弹出窗口大小
这段代码很实用,用JS重新调整弹出窗口大小
来源:http://hi.baidu.com/xsharkx/blog/item/029ab516ca08c154f2de321d.html



function winResize(){ 
   var ToH=525; 
   var ToW=700; 
if(window.navigator.appName=="Netscape"){ //firefox 
       window.innerHeight=ToH; 
       window.innerWidth=ToW; 
    }else{//ie 
       var cWinwidth=window.document.documentElement.clientWidth; 
       var cWinheight=window.document.documentElement.clientHeight; 
       window.resizeBy(ToW-cWinwidth,ToH-cWinheight);
       cWinwidth=window.document.documentElement.clientWidth; 
       cWinheight=window.document.documentElement.clientHeight; 
       window.resizeBy(ToW-cWinwidth,ToH-cWinheight); 
   } 
}
1 楼 ocean_llc 2011-10-09  
  相关解决方案