前端开发入门到进阶第三集定时器

Posted lirenhe

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了前端开发入门到进阶第三集定时器相关的知识,希望对你有一定的参考价值。


var mi = 0;
var timer = setTimeout(handler,1000);
function handler()
if(mi == 5)
$(".item-desc .desc-part").empty();
clearTimeout(timer);
return; 你没有在clearTimeout后return函数的结果,导致代码继续运行。 https://zhidao.baidu.com/question/1542396607093854467.html

mi ++ ;
setTimeout(handler,1000);


参考:https://www.jquery123.com/fadeOut/

$(".item-desc .desc-part").fadeOut(5000,function()
$(".item-desc .desc-part").empty();
);

以上是关于前端开发入门到进阶第三集定时器的主要内容,如果未能解决你的问题,请参考以下文章