jq倒计时

 var referTime = 5;
        setInterval("refer('#show')", 1000);
        function refer(obj){
            if(referTime === 0){
                location="demo.kppw.cn";
            }else if(referTime>0){
                $(obj).text(referTime);
                referTime--;
            }
        }

 

posted @ 2016-12-14 11:48  幸福的目标  阅读(89)  评论(0编辑  收藏  举报