網路城邦
上一篇 回創作列表 下一篇   字體:
071219系統分析與設計-震動
2007/12/19 10:05:10瀏覽191|回應0|推薦0

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>新增網頁1</title>

<script>
 function myResize() //調整大小
  {
   window.resizeTo(450,400);
  }
 function myMoveUp()//移動視窗
  {
   window.resizeBy(+100,+100);
  }
 function myMoveLeft()//移動視窗
  {
   window.resizeBy(-100,-100);
  }
 function myMoveRight()//移動視窗
  {
   window.moveBy(5, 0);
   window.moveBy(-5, 0);
   timerID=setTimeout(myMoveRight(),10)  }
 function myMoveDown()//移動視窗
  {
    clearTimeout(timerID)
  }

 function myMove() //調整大小
  {
   window.resizeTo(myForm.myX.value,myForm.myY.value);
  }
</script>

<body onLoad="myResize()">

</head>

<body>

<p align="center">利用按鈕來改變視窗位置</p>
<div align="center">
 <form name=myForm>
 <table border="0" id="table1">
  <tr>
   <td align="center"> </td>
   <td align="center"><input type="button" value="放大" name="big" onclick="myMoveUp()"></td>
   <td align="center"> </td>
  </tr>
  <tr>
   <td align="center"><input type="button" value="縮小" name="smill" onclick="myMoveLeft()"></td>
   <td align="center"> </td>
   <td align="center"><input type="button" value="震動" name="ran" onclick="myMoveRight()"></td>
  </tr>
  <tr>
   <td align="center"> </td>
   <td align="center"><input type="button" value="停止震動" name="stop" onclick="myMoveDown()"></td>
   <td align="center"> </td>
  </tr>
  <tr>
   <td align="center">X座標</td>
   <td align="center">
   <input type="text" value="0" name="myX" size="10"></td>
   <td align="center" rowspan="2">
   <input type="button" value="視窗大小" name="move" onclick="myMove()"></td>
  </tr>
  <tr>
   <td align="center">Y座標</td>
   <td align="center">
   <input type="text" value="0" name ="myY" size="10"></td>
  </tr>
 </table>
 </form>
</div>

</body>

</html>

( 心情隨筆心情日記 )
回應 推薦文章 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=crystal9683&aid=1466840