<script language="javascript">
var checkSubmitFlg = false;
function checkSubmit() {
if (checkSubmitFlg == true) {
alert("正在查询中..");
return false;
}
checkSubmitFlg = true;
setTimeout(function() {
checkSubmitFlg = false;
}, 5000);
return true;
}
</script>
<form method=post action="/search.jsp#m" target="_blank"
onsubmit="return checkSubmit();">
<input value="小说城" type="text" name="name" size="35" maxlength="10">
<input type="submit" id="submitInput"/>
</form>
js 5秒之内禁止重复提交代码
最新推荐文章于 2024-01-09 14:51:47 发布