function win_onLoad(){
var width = document.all["tblKsList"].offsetWidth;
var height = document.all["tblKsList"].offsetHeight;
width = eval(width + 50);
height = eval(height + 50);
if (width < 500){
width = 500;
}else if (width > screen.width){
width = screen.width;
}
if (height < 400){
height = 400;
}else if (height > screen.height){
height = screen.height;
}
window.resizeTo(width,height);
}
var width = document.all["tblKsList"].offsetWidth;
var height = document.all["tblKsList"].offsetHeight;
width = eval(width + 50);
height = eval(height + 50);
if (width < 500){
width = 500;
}else if (width > screen.width){
width = screen.width;
}
if (height < 400){
height = 400;
}else if (height > screen.height){
height = screen.height;
}
window.resizeTo(width,height);
}
本文介绍了一段用于调整浏览器窗口尺寸的JavaScript脚本,确保了在不同分辨率下网页内容的适配显示。该脚本根据屏幕大小自动调整窗口宽度和高度。

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



