Posted in Javascript onNovember 14, 2013
<head> <title>test count down button</title> <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $('#btn').click(function () { var count = 3; var countdown = setInterval(CountDown, 1000); function CountDown() { $("#btn").attr("disabled", true); $("#btn").val("Please wait " + count + " seconds!"); if (count == 0) { $("#btn").val("Submit").removeAttr("disabled"); clearInterval(countdown); } count--; } }) }); </script> </head> <body> <input type="button" id="btn" value="Submit" /> </body>
有兴趣您可以自己实现一下。
JQuery实现倒计时按钮具体方法
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@