倒计时 js

来源:互联网 发布:js 多功能日历插件 编辑:程序博客网 时间:2024/05/21 22:58
 //倒计时
                    var num = 60;
                    var time = setInterval(function () {
                        num--;
                        $('#send i').css('color','#666666').text('重新获取' + '(' + num + ')')
                        $('#send').css({
                            'pointerEvents': 'none'
                        })
                        //console.log(num)
                        if (!num) {
                            clearInterval(time);
                            $('#send i').css('color','#389EFA').text('重新发送');
                            $('#send').css({
                                'pointerEvents': 'auto'
                            })
                        }
                    }, 1000); 
原创粉丝点击