<input type=
"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>
时间: 2024-11-04 19:47:36