大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 网页设计 -> 网页特效 -> 用JavaScript实现动画效果(2)

用JavaScript实现动画效果(2)

时间: 2021-07-31 作者:daque

</head>  <body>  <div id="div1" style="visibility:visible; position:absolute; left:10; top:10; z-index:1;">   <table bgcolor="#ffffcc" border="1"cellpadding="0" cellspacing="0">    <tr>     <td>i can moving...</td>    </tr>   </table>  </div>

  <br><br>  <input type="button" value="发端挪动" onclick="startmove()">  <input type="button" value="遏止挪动" onclick="stopmove()">

   </body>  </html> 

  这边重要运用了一个叫settimeout(function, interval)因变量,这个因变量的参数方法为:  第一个参数“function”为超时后挪用的因变量名,第二个参数“interval”为超时价,以微秒为单元。

  提防一点是即使要遏止这个计时器,必需生存挪用这个settimeout()因变量后的归来值,经过cleartimeout(id)因变量来废除计时器。

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.