js
/*方法1:设置一个全局JS变量*/
var submited = false;
function checkSubmit() {
if (!submited)
{
submited = true;
return true;
}
else {
alert("请不要重复提交!");
return false;
}
}
function submitForm() {
var f = document.getElementById("inputForm");
if (checkSubmit())
{
f.submit();
}
}
html