JQuery-倒计时显示并跳转

来源:互联网 发布:飞思卡尔官网编程软件 编辑:程序博客网 时间:2024/06/05 19:26
function jump(count) {            var str = "a word";            window.setTimeout(function() {                count--;                if (count > 0) {                    $('#id').text(count + str);                    jump(count);                } else {                    location.href = "target";                }            }, 1000);//1秒        }        $(function() {            jump(5);        });
原创粉丝点击