(二).代码
html
head
titlewindow.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=lightgreenfont color=blue size=3
请输入窗口宽度/高度值
(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/webkaifa/)/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