当前位置:网站首页>Seconds understand the delay and timing function of wechat applet
Seconds understand the delay and timing function of wechat applet
2022-07-07 02:03:00 【Full stack o-jay】
The time delay function , Print once in two seconds “hello”.
setTimeout(()=>
{
console.log("hello");
}, 2*1000);
Timing function , Print every two seconds “hello”.
setInterval(()=>
{
console.log("hello");
}, 2*1000);
If you want to Cancel timing function , be
var k = setInterval(()=>
{
console.log("hello");
}, 2*1000);
clearInterval(k);
The above function can cancel the timer ,k It's a timer id.
边栏推荐
- centos8安裝mysql報錯:The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already ins
- When grep looks for a process, it ignores the grep process itself
- How can I code for 8 hours without getting tired.
- 爬虫实战(六):爬笔趣阁小说
- 处理streamlit库上传的图片文件
- ROS learning (26) dynamic parameter configuration
- UC伯克利助理教授Jacob Steinhardt预测AI基准性能:AI在数学等领域的进展比预想要快,但鲁棒性基准性能进展较慢
- JS ES5也可以创建常量?
- Mongodb checks whether the table is imported successfully
- JS how to quickly create an array with length n
猜你喜欢
将截断字符串或二进制数据
ROS learning (22) TF transformation
New job insights ~ leave the old and welcome the new~
Centros 8 installation MySQL Error: The gpg Keys listed for the "MySQL 8.0 Community Server" repository are already ins
FLIR blackfly s industrial camera: synchronous shooting of multiple cameras through external trigger
Ros Learning (23) Action Communication Mechanism
制作带照明的DIY焊接排烟器
MySQL execution process and sequence
sql中批量删除数据---实体中的集合
Scenario practice: quickly build wordpress blog system based on function calculation
随机推荐
The GPG keys listed for the "MySQL 8.0 community server" repository are already ins
刨析《C语言》【进阶】付费知识【完结】
微服务架构介绍
How did partydao turn a tweet into a $200million product Dao in one year
JVM memory model
JS ES5也可以创建常量?
centos8 用yum 安装MySQL 8.0.x
FLIR blackfly s industrial camera: configure multiple cameras for synchronous shooting
处理streamlit库上传的图片文件
张平安:加快云上数字创新,共建产业智慧生态
BigDecimal 的正确使用方式
红外相机:巨哥红外MAG32产品介绍
永久的摇篮
制作带照明的DIY焊接排烟器
Domestic images of various languages, software and systems. It is enough to collect this warehouse: Thanks mirror
AcWing 344. Solution to the problem of sightseeing tour (Floyd finding the minimum ring of undirected graph)
Scenario practice: quickly build wordpress blog system based on function calculation
Flir Blackfly S 工业相机:自动曝光配置及代码
CISP-PTE之命令注入篇
Introduction to microservice architecture