<!doctype html>
<html>
<head>
? ? <meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript">
window.onload=function(){
? ?var send=document.getElementById('send'),
? ? ? ?times=10,
? ? ? ?timer=null;
? ?send.onclick=function(){
? ? ?
? ? ? ? ? timer=setInterval(
? ? ? ? ? ? ?changeText?
? ? ? ? ? ? ? ,1000);
? ? ? ? ? ? ??
}?
? ? function changeText(){
? ? ? ??
? ? ? ?if(times<=0){
? ? ? ? ? ? clearInterval(timer);
? ? ? ? ? ? timer=null;
? ? ? ? ? ? times=10;
? ? ? ? ? ? send.value="SB繼續(xù)驗(yàn)證";
? ? ? ? ? ? send.disabled=false;
? ? ? ? ? ? return;
? ? ? ? }
? ? ? ? else{
? ? ? ? ? ? times--;
? ? ? ? ? ? send.value=times+"秒后重試";
? ? ? ? ? ? send.disabled=true;
? ? ? ? }
? ? ? }
? ? ? ??
}
</script>
</head>
<body>
<input type="button" id="send" value="發(fā)送驗(yàn)證碼">
</body>
</html>
2014-10-06
課程下面有個(gè)相機(jī)的圖標(biāo),你試試
2014-10-05
為啥大家都是代碼快照,而我的是復(fù)制的呢???