<script type="text/javascript"> var checkSubmitFlg = false; function checkSubmit() { if (!checkSubmitFlg) { // 第一次提交 checkSubmitFlg = true; return true; } else { //重复提交 alert("Submit again!"); return false; } } </script> //以下三种方式分别调用 <form onsubmit="return checkSubmit();"> <input type="submit" onclick="return checkSubmit();" /> <input type="button" onclick="document.forms[0].action='./test';document.forms[0].submit();return checkSubmit();" />