<!DOCTYPE html> <html> <head> <title> my name is lian lily</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript">
var times = 0 function show(obj) { $("#btn_"+obj).attr("disabled","disabled");//设置button不可用 times++; if(times == 2){ alert(obj); times = 0; $("#btn_"+obj).removeAttr("disabled"); return ; } //$("#frm"+obj).submit(); setTimeout("show("+obj+")" , 3000); } </script> </head>