短信验证按钮倒计时功能:

$('.btn').click(function(){
        var time = 59;
        // $('.btn').css('background-color','#ccc'); //两种方式
        $('.btn').attr({'disabled':'disabled'});
        var t = setInterval(function(){
            $('.btn').text('重新发送'+time);
            time--;
            if(time <= 0){
                $('.btn').text('发送短信');
                $('.btn').attr('disabled',false);
                clearInterval(t);
            }
        },1000);
    });
<button type="button" class="btn button-primary" style="height: 40px;">发送短信</button>