qhorse
 

简单的点击短信发送计时器



<input type="button" id="btn" value="发送短信">
<script type="text/javascript"  src="/jquery/jquery.js">
    var count_time= 60;//定义规定的时间,60秒后再次发送
    function start_timer()
    {
         
        if(count_time == 0)
        {
            $(\'#btn\').removeAttr("disabled");
            $(\'#btn\').val("重新发送");
            count_time= 60;
        }else
        {
            $(\'#btn\').attr("disabled",true);
            $(\'#btn\').val("重新发送("+count_time+")");
            count_time--;
            setTimeout(function(){start_timer();},1000);
        }
 
    }
 
    $(\'#btn\').click(function(){
        start_timer();
    });
</script>

 

分类:

技术点:

相关文章:

  • 2021-07-24
  • 2022-12-23
  • 2021-12-31
  • 2022-01-12
  • 2022-12-23
  • 2021-12-31
  • 2021-07-27
猜你喜欢
  • 2021-10-26
  • 2022-12-23
  • 2021-05-11
  • 2021-12-24
  • 2021-12-04
  • 2021-12-04
相关资源
相似解决方案