1,只执行一次的定时器 代码如下: [removed] //定时器 异步运行 function hello(){ alert(“hello”); } //使用方法名字执行方法 var t1 = window.setTimeout(hello,1000); var t2 = window.setTimeout(“hello()”,3000);//使用字符串执行方法 window.clearTimeout(t1);//去掉定时器 [removed] 2,重复执行的定时器 代码如下: [removed] function hello(){ alert(“hello”); } //重复执行某个方法