首页 > 网站 > WEB开发 > 正文

setTimeout和setInterval的unref()和ref()用法

2024-04-27 14:18:32
字体:
来源:转载
供稿:网友

setTimeout和setInterval的unref()和ref()用法

Posted on 2014-10-02 09:56 思思博士 阅读(...) 评论(...) 编辑 收藏
1 var testFunction=function(){2     console.log("guoyansi");3 }4 var timer=setInterval(testFunction,1000);5 timer.unref();//取消setTimeout和setInterval函數的調用6 timer.ref();//恢復setTimeout和setInterval函數的調用


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表