<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>Insert title here</title>
<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>
</head>
<body>
<span id="jumpTo">5</span>秒后自动跳转到http://www.baidu.com/
<script type="text/javascript">
countDown(5, 'http://www.baidu.com/');
</script>
</body>
</html>
5秒后自动跳转
最新推荐文章于 2022-01-04 17:03:51 发布