(一).示例图片效果
(二).代码
<html>
<head>
<title>window.resizeTo()函数</title>
<script laguage="javascript">
<!--
function resizewindow(form)
{
var x=form.X.value;
var y=form.Y.value;
window.resizeTo(x,y);
}
//-->
</script>
</head>
<body bgcolor="#6699ff" text="#000000">
<form name=form1>
<table border=0 align=center width="575">
<tr>
<td colspan=3 align=center bgcolor=lightgreen><font color=blue size=3>
请输入窗口宽度/高度值</font></td>
</tr>
<tr>
<td>
<input type=text name="X" style="color:blue">
</td>
<td>
<input type=text name="Y" style="color:blue">
</td>
<td>
<input type=button value="scroll window" onclick=resizewindow(this.form) style="background-color:lightblue;">
</td>
</tr>
</table>
</form>
</body>
</html>