这段代码很实用,用JS重新调整弹出窗口大小
来源:http://hi.baidu.com/xsharkx/blog/item/029ab516ca08c154f2de321d.html
来源: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);
}
}
本文介绍了一种利用JavaScript实现弹出窗口大小动态调整的方法,通过判断浏览器类型并应用不同的样式规则来达到目标。
2162

被折叠的 条评论
为什么被折叠?



