<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<meta http-equiv=refresh content="5;url=http://127.0.0.1:8000/app01/login"> {#5秒后跳转到另一个页面#}
</head>
<body>
{# 绑定js事件 5 秒后跳转 5是动态显示#}
<div style="text-align: center"> <h1>请登录后访问 <span id='numDiv'> 5</span>秒后跳转 不跳转请点击 <a href="/app01/login/">登录页面</a></h1></div>
</body>
{#js的定义#}
<script type="text/javascript">
{#4 其实代表5秒后跳转#}
var num=4;
var interval=setInterval(function(){
if(num==0){
clearInterval(interval);
}
numDiv.innerHTML=num--;
},1000);
</script>
</html>