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);
});
JQuery-倒计时显示并跳转
最新推荐文章于 2024-07-21 02:48:55 发布