zoukankan      html  css  js  c++  java
  • 单击倒计时

    <div class="getCodeWrap">
      <input class="iptClass wid310" type="text" value="" />
      <input class="getCode" type="button" value="获取验证码">
      <div class="codeTime"><span>60</span>s</div>
      <div class="error"><i class="errorIcon"></i>短信验证码有误,请重新输入!</div>
    </div>

    //单击倒计时
    $(".getCode").click(function(){
    $(this).hide();
    $(this).next(".codeTime").show();

    var ma=$(this);
    function run(){
    var s=ma.next().find('span').text();
    if (s>0) {
    ma.next().find('span').text(s-1);
    } else{
    clearInterval(m);
    ma.show();
    ma.next(".codeTime").hide();
    $(".codeTime span").text("60")
    }
    }

    var m=window.setInterval(run,1000);
    })

  • 相关阅读:
    高频交易程序竟然是饿罗斯人开发的?
    系统功能在用户测试阶段被推翻
    去新华书店有感
    金桔
    结香
    金钟花
    金丝桃
    箬竹
    香茶菜
    水果兰
  • 原文地址:https://www.cnblogs.com/ourLifes/p/9698680.html
Copyright © 2011-2022 走看看