<div class="codetitle"> <span><a style="CURSOR: pointer" data="23347" class="copybut" id="copybut23347" onclick="doCopy('code23347')"><u>複製代碼</u></a></span>代碼如下:</div> <div class="codebody" id="code23347"> <br> <br> <br> <br>我叫蓮百合 <br><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <br> <br> <br><br>var times = 0 <br>function show(obj) { <br>$("#btn_" obj).attr("disabled","disabled");//設定鈕不可用<br>次; <br>if(time == 2){ <br>alert(obj); <br>次數= 0; <br>$("#btn_" obj).removeAttr("已停用"); <br>返回; <br>} <br>//$("#frm" obj).submit(); <br>setTimeout("show(" obj ")" , 3000); <br>} <br>腳本> <br>頭> <br><br> <br><form action="post.php" method="post" name="frm1" id="frm1"> <br><input type="button" name="btn_1" id="btn_1" value="提交1" onclick="show(1)">> <br>表格> <br><br> </form> <form action="post%20.php" method="post" name="frm2" id="frm2"> <br><input type="button" name="btn_2" id="btn_2" value="提交2" onclick="show( 2)"> <br>表格> <br>身體> <br> <br> </form> </div>