亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

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

交作業。。

<!doctype html>

<html>

<head>

? ? <meta charset="UTF-8">

<title>Document</title>

<script type="text/javascript">

window.onload=function(){

? ? var send=document.getElementById('send');

var main = document.body;

? ? ? ? times=5;

? ? ? ? timer=null;

// 方法一:

var input_out=document.createElement("input");

input_out.setAttribute("type","button");

input_out.setAttribute("id","out");

input_out.setAttribute("value","接收驗證碼");

main.appendChild(input_out);

? ? send.onclick=function(){

? ? ? // 計時開始?

timer=setInterval(function(){

var send_out=document.getElementById("out");

times--;

send_out.value=times+"秒后重試";

send_out.disabled=true;

if(times==0){

send_out.value="發送成功";

clearInterval(timer);

? ? send_out.disabled=false;

}?

},1000);

??

// 方法二: ??

// ?timer=setInterval(function(){

// ?times--;

// ?send.value=times+"秒后重試";

// ?// send.setAttribute("disabled","disabled");

// ?send.disabled=true;

// ?if(times==0){

// ?send.value="發送驗證碼";

// ?clearInterval(timer);

// ?// send.setAttribute("disabled","enable");

// ?send.disabled=false;

// ?}

// ?},1000);

//?

? ? ??

? ? }?

}

</script>

</head>

<body>

<input type="button" id="send" value="發送驗證碼">

</body>

</html>


正在回答

1 回答

經驗+1

1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
Tab選項卡切換效果
  • 參與學習       65466    人
  • 解答問題       581    個

本課程詳細介紹網頁頁面中最流行常用的tab切換效果

進入課程

交作業。。

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號