t-1.发送手机验证码---未完成

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    a{
      color:red;
    }
    .disable{
      pointer-events:none;
      color:#666;
    }
  </style>
</head>
<body>
  <a href="javascript:;" id="btn">发送验证码</a>
  <script>
    var oBtn=document.getElementById("btn");
    oBtn.onclick=function(){
      oBtn.classList.add("disable");
      setTimeout(function(){
          oBtn.classList.remove('disable');
      },3000)
    };
  </script>
</body>
</html>
原文地址:https://www.cnblogs.com/stone5/p/8998550.html