function showtime() {
fun_timedown(5);
}
function fun_timedown(time) {
$("#timedown").val(time + "秒");
time = time - 1;
if (time >= 0) {
$("#timedown").attr("disabled", "disabled");
setTimeout("fun_timedown(" + time + ")", 1000); } else { alert('倒计时结束啦'); }
}
<input type="button" id="timedown" value="确定"/>
<a href="javascript:showtime()">点击</a>