<script language=javascript>
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;
//alert(width);alert(height);
window.resizeTo(width,height);
}
</script>
1.移动窗口
window.resizeBy(x,y);
window.resizeTo(x,y);
resizeBy() 与resizeTo() 之间的主要差别在于前者的大小设定是相对的,而后者则是绝对的;
2.移动窗口
window.moveTo(x,y)
如果要改变 JavaScript 产生的窗口的大小,那么必须在打开窗口时加上 resizable 特性。
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;
//alert(width);alert(height);
window.resizeTo(width,height);
}
</script>
1.移动窗口
window.resizeBy(x,y);
window.resizeTo(x,y);
resizeBy() 与resizeTo() 之间的主要差别在于前者的大小设定是相对的,而后者则是绝对的;
2.移动窗口
window.moveTo(x,y)
如果要改变 JavaScript 产生的窗口的大小,那么必须在打开窗口时加上 resizable 特性。