<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><title> my name is lian lily</title> <br><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <br><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <br><script type="text/javascript"> <br><br>var times = 0 <BR>function show(obj) { <BR>$("#btn_"+obj).attr("disabled","disabled");//设置button不可用 <BR>times++; <BR>if(times == 2){ <BR>alert(obj); <BR>times = 0; <BR>$("#btn_"+obj).removeAttr("disabled"); <BR>return ; <BR>} <BR>//$("#frm"+obj).submit(); <BR>setTimeout("show("+obj+")" , 3000); <BR>} <BR></script> <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> </form> <br><br><form action="post.php" method="post" name="frm2" id="frm2"> <br><input type="button" name="btn_2" id="btn_2" value="提交2" onclick="show(2)"> <br> </form> <br> <br> <br> </div>