倒计时控制数量传递

  // 倒计时控制数量传值
  var countdown;
  function timer(time){
    clearInterval(countdown);
        var i = time;
        countdown = setInterval(function(){
            if( i <= 1){
              clearInterval(countdown);
            }
             i--;
        },100);
  } 

猜你喜欢

转载自blog.csdn.net/m0_37400682/article/details/73468327