study025
来源:互联网 发布:詹姆斯热火时期数据 编辑:程序博客网 时间:2024/06/16 20:44
<html>
<head>
<title>study 025</title>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
<script language="javascript" type="text/javascript">...
function DoIt()
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
...{
if (document.form1.w.value && document.form1.h.value)
self.resizeTo(document.form1.w.value, document.form1.h.value);
if (document.form1.x.value && document.form1.y.value)
self.moveTo(document.form1.x.value, document.form1.y.value);
}
</script>
</head>
<body>
<form name="form1">
<b>宽度:</b><input type="text" name="w"><br>
<b>高度:</b><input type="text" name="h"><br>
<b>左边距:</b><input type="text" name="x"><br>
<b>上边距:</b><input type="text" name="y"><br>
<input type="button" value="改变窗体位置和大小" onClick="DoIt();">
</form>
</body>
</html>