xustar 发表于 2013-1-22 22:35:09

setTimeout()/setInterval()

JavaScript
**************************

   setInterval() 函数
   setInterval -- 间隔指定的毫秒数不停地执行指定的代码;
   setInterval(codes,interval);
   codes -- 代码段的字符串表示(与eval函数的参数相同),或者是匿名函数、函数名
   interval -- 间隔的毫秒数
***************************   

   clearInterval() 函数
   clearInterval -- 取消指定的setInterval函数将要执行的代码
***************************

   setTimeout() 函数
   setTimeout -- 暂停指定的毫秒数后执行指定的代码
   setTimeout(codes, interval);
   codes -- 代码段的字符串表示(与eval函数的参数相同),或者是匿名函数、函数名
   interval -- 等待的毫秒数(通常用于产生动画效果)
***************************

   clearTimeout() 函数
   clearTimeout -- 取消指定的setTimeout函数将要执行的代码
   clearTimeout(id);
   id -- setTimeout函数返回的ID
页: [1]
查看完整版本: setTimeout()/setInterval()