日期:2014-05-16  浏览次数:20316 次

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