按钮倒计时后才可以点击的效果
<script language="javascript">
var speed = 1000; //速度
var wait = 6;
function updateinfo(){
document.getElementById("getcode").disabled = true;
if(wait == 0){
document.getElementById("getcode").disabled = false;
document.getElementById("getcode").innerHTML = "获取验证码";
} else {
document.getElementById("getcode").innerHTML = "输入验证码" + wait;
wait--;
window.setTimeout("updateinfo()",speed);
}
}
</script>
<button id="getcode" onclick="updateinfo()">获取验证码</button>