5秒后跳转到另一个页面代码

5秒后跳转到另一个页面代码

<html lang="en">
<head>
<meta charset="UTF-8">
<title>5秒后跳转到另一个页面</title>
</head>
<script>
var t = 5;
var s = '.';
timeID=setInterval("countDown()",1000);
function countDown(){
time.innerHTML= t +"秒后跳转"+s;
t--;
s+='.';
if (t==0) {
location.href="http://gjooo.com/";
clearInterval(timeID);
}
}
</script>
<body>
<div><font ID="time" face="impact" color="#272822" size="7">即将跳转</font>
</div>
</body>
</html>

2022-01-15 16:38:54 通过 网页 浏览(566)

共有0条评论!

发表评论

更换一道题!