var hander = 0; function btnClick() { if (hander != 0) { clearTimeout(hander); hander = 0; } hander = setTimeout(function () { Run(); }, 300); } function Run() { console.log(‘Run‘); }<input type="button" onclick="btnClick()" value="快速点击只触发最后一次" />原文:http://www.cnblogs.com/chencheng365/p/4291504.html