timerFun() function timerFun(){ //要执行的操作 var timer=setTimeout(function(){ timerFun() clearTimeout(timer) },2000) }