html
<button>按钮</button>
script
var a = 0;
$("button").click(function() {
if(a == 0) {
a = 1;
console.log("点击了");
setTimeout(function() {
a = 0
}, 5000);
}
});
html
<button>按钮</button>
script
var a = 0;
$("button").click(function() {
if(a == 0) {
a = 1;
console.log("点击了");
setTimeout(function() {
a = 0
}, 5000);
}
});