根据 event.timeStamp 防抖
最后更新于:2022-04-02 03:18:53
[TOC]
## 根据event.timeStamp 防抖
```
var last=0;
$('div').click(function(event) {
let currTime =event.timeStamp
console.log(currTime);
if (currTime - last > 1000){// 每秒触发一次
// todo
console.log("todo");
last=currTime
}
});
```
';