怎么不能实现呢
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
#receive{display:none;}
</style>
<script type="text/javascript">
window.onload=function(){
var send=document.getElementById('send'),
receive=document.getElementById('receive'),
times=60,
timer=null;
send.onclick=function(){
// 计时开始
timer=setInterval('showTime',500);
}
function showTime(){
if(times>=0){
receive.style.display='block';
receive.disabled ='false';
receive.value=times+'秒后重试';
times--;
send.disabled='false';
}
else{
clearInterval(timer);
receive.style.display='none';
}
}
}
</script>
</head>
<body>
<input type="button" id="send" value="发送验证码" >
<input type="button" id="receive" >
</body>
</html>