PHP 按钮怎么倒计时

用js
<script language="JavaScript">
function qq(){
//提交操作
var btn = document.getElementById("btn")
btn.disabled=true
c(4)
}
function c(i){
 var btn = document.getElementById("btn")
 i--;
 if(i==0){
  btn.value = "确定"
  btn.disabled=false
 }
 else{
  btn.value = "确定("+i+")"
  setTimeout("c("+i+")",1000)
 }
}
</script>

<input type="button" onclick="qq()" id="btn" value="确定">
posted @ 2012-08-15 13:31  网络爱上点击  阅读(562)  评论(0编辑  收藏  举报