<div class="codetitle"> <span><a style="CURSOR: pointer" data="52160" class="copybut" id="copybut52160" onclick="doCopy('code52160')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code52160"> <br> <br><title>test count down button</title> <br><script src="http://demo.jb51.net/jslib/jquery/jquery-1.5.1.min.js" type="text/javascript"></script> <br><script type="text/javascript"> <BR>$(function () { <BR>$('#btn').click(function () { <BR>var count = 3; <BR>var countdown = setInterval(CountDown, 1000); <br><br>function CountDown() { <BR>$("#btn").attr("disabled", true); <BR>$("#btn").val("Please wait " + count + " seconds!"); <BR>if (count == 0) { <BR>$("#btn").val("Submit").removeAttr("disabled"); <BR>clearInterval(countdown); <BR>} <BR>count--; <BR>} <BR>}) <br><br>}); <BR></script> <br> <br> <br><input type="button" id="btn" value="Submit"> <br> <br> </div> <br>有兴趣您可以自己实现一下。