<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript">
function back(){
window.history.back();
}
var count=document.getElementById("count").innerHTML;
//获取倒计时的值
function count1(){
count--;
document.getElementById("count").innerHTML=count;
if(count==0){
location.assign("www.imooc.com");
}
}
setInterval("count1()",1000);
</script>
</head>
<body>
<h1>操作成功</h1>
<p><span id="count">5</span>秒后返回主页</p>
<a href="javascript:back();">返回</a>
</body>
</html>
stone310
慕的地8582982
相关分类