会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
TwinkleG
CnBlogs
Home
New Post
Contact
Admin
Subscription
2021年9月15日
防抖(debounce) and 节流(throttle)
1. 防抖:简单来说即当一个事件我们不希望其频繁被触发,可以使用防抖. 原理是当一个事件被触发后,如果在未被执行前【处于setTimeout的delay阶段】再次触发该事件,则事件重新计时. function debounce(func, delay) { let timer = undefined
Read More
posted @ 2021-09-15 20:58 TwinkleG
Views(109)
Comments(0)
Diggs(0)
公告