html代码:
<span class="font1 fonb">系统将在</span><span class="font3 fonb" id="JS_time">10</span><span class="font1 fonb">秒后返回首页 </span>
js代码:
(function BackHome(time) {
if (time <= 0) {
top.location.href = "/";
return;
}
time -= 1;
$("#JS_time").text(time);
setTimeout(function () { BackHome(time); }, 1000);
})(11);