<script type="text/javascript">
function countDown(secs, surl) {
var jumpTo = document.getElementById('jumpTo');
jumpTo.innerHTML = secs;
if (--secs > 0) {
setTimeout("countDown(" + secs + ",'" + surl + "')", 1000);
}else {
location.href = surl;
}
}
</script>
<span id="jumpTo">5</span>秒后自动跳转到首页
<script type="text/javascript">countDown(5, 'http://www.fooov.com');</script>
本文共366个字符,其中有 9 个汉字,平均阅读时长 ≈ 2分钟
评论