study025

<html>
<head>
<title>study 025</title>
<script language="javascript" type="text/javascript">
function DoIt()
{
    
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>
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章