倒计时跳转

$(function () {
        var i = 3;
        var intervalid;
        intervalid = setInterval(function () {
            if (i == 0) {
                clearInterval(intervalid);
                window.location.href = "javascript:;";
            }
            $("#lblSecods").text(i - 1 >= 0 ? i - 1 : 0);
            i--;
        }, 1000);
    });

  

posted @ 2017-01-06 15:21  asimpleday  阅读(187)  评论(0编辑  收藏  举报