<strong>第一種:</strong>用flag標識,下面的程式碼設定checkSubmitFlg標誌:<br><div class="codetitle"><span><a style="CURSOR: pointer" data="11315" class="copybut" id="copybut11315" onclick="doCopy('code11315')"><u>複製程式碼</u></a></span></div>複製程式碼<div class="codebody" id="code11315"> <br><br><br>複製程式碼<br><br><br><br>複製程式碼<br><br><br><br>複製程式碼<br><br><br><br>複製程式碼<br><br><br><br> 程式碼<br><br> <br><script language="”javascript”"> </script> </div> <br>var checkSubmitFlg = false; <strong></strong>function checkSubmit(){ <g return false><div class="codetitle">} <span><a style="CURSOR: pointer" data="3029" class="copybut" id="copybut3029" onclick="doCopy('code3029')">checkSubmitFlg ==true; <u></u>return true; </a></span>} </div> <div class="codebody" id="code3029"> <br>} <br><br> <br><br>……….. <br><br> </div> <br>第二種:<br>在onsubmit事件中設置,在第一次提交後使提交按鈕失效,代碼如下: <div class="codetitle"><span><a style="CURSOR: pointer" data="81003" class="copybut" id="copybut81003" onclick="doCopy('code81003')"><u></u>複製代碼</a></span></div> 程式碼如下:<div class="codebody" id="code81003"> <br> <br><form action="%E2%80%9Dabout:blank%E2%80%9D" method="”post”" onsubmit="”getElementById('submitInput').disabled=true;return" true target="”_blank"> <br><input type="”submit”" id="”submitInput”/"> <br> </form> <br> </div></g>