<inputtype=
"button"
id=
"submit"
value=
"提交"
>
<script>
$(document).ready(
function
(){
$(
"#submit"
).click(
function
(){
var
nowTime=
new
Date().getTime();
var
clickTime=$(
this
).attr(
"ctime"
);
if
(clickTime!=
'undefined'
&&(nowTime-clickTime<5000)){
alert(
'操作过于频繁,稍后再试'
);
return
false
;
}
else
{
$(
this
).attr(
"ctime"
,nowTime);
alert(
'提交成功'
);
}
});
});
</script>
如果觉得《如何禁止用户连续点击一个按钮事件详细JS》对你有帮助,请点赞、收藏,并留下你的观点哦!