最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號安全,請及時綁定郵箱和手機立即綁定

怎么不能實現(xiàn)呢

<!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="發(fā)送驗證碼" >
??? <input type="button" id="receive" >
</body>
</html>

正在回答

1 回答

setInterval()調(diào)用出錯。 正確的調(diào)用方式如下:

?? timer=setInterval('showTime()',500);??????? 或 ?? timer=setInterval(showTime,500);????????

定義和用法

setInterval() 方法可按照指定的周期(以毫秒計)來調(diào)用函數(shù)或計算表達(dá)式。

setInterval() 方法會不停地調(diào)用函數(shù),直到 clearInterval() 被調(diào)用或窗口被關(guān)閉。由 setInterval() 返回的 ID 值可用作 clearInterval() 方法的參數(shù)。

語法??? setInterval(code,millisec[,"lang"])?

參數(shù)???? 描述

code ? ?必需。要調(diào)用的函數(shù)或要執(zhí)行的代碼串。 ? ?

millisec ? ?必須。周期性執(zhí)行或調(diào)用 code 之間的時間間隔,以毫秒計。 ? ?


0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

怎么不能實現(xiàn)呢

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號