Timer:setTimeout()and seInterval()

javascript中有两个设置定时任务的函数setTimeout()和setInterval()。

区别:
setTimeout()只能执行一次。如果需要执行多次,使用setInterval()或调用自身setTimeout()。

举例:

posted @ 2014-09-11 16:20  JQaping  阅读(212)  评论(0)    收藏  举报