The jquery Settings button pause is not available for 3 seconds

  • 2020-03-30 02:18:55
  • OfStack

<!DOCTYPE html> 
<title> my name is lian lily</title> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<script src=""></script> 
<script type="text/javascript"> 

var times = 0 
function show(obj) { 
$("#btn_"+obj).attr("disabled","disabled");//Set the button to be unavailable
if(times == 2){ 
times = 0; 
return ; 
setTimeout("show("+obj+")" , 3000); 

<form action ='post.php' method="post" name="frm1" id="frm1"> 
<input type="button" name="btn_1" id="btn_1" value=" submit 1" onclick="show(1)" /> 

<form action ='post.php' method="post" name="frm2" id="frm2"> 
<input type="button" name="btn_2" id="btn_2" value=" submit 2" onclick="show(2)"/> 

Related articles: