<!DOCTYPE html>
<html>
<head>
<title>浏览器对象</title>
<meta http-equiv="Content-Type" content="text/html; charset=gkb"/>
</head>
<body>
<!--先编写好网页布局-->
<h3>操作成功</h3>
<p>
<input type="text" id="count" value="15"/>秒后回到主页
<a href="#" onclick="goback()">返回</a>
</p>
<script type="text/javascript">
var num=15;
document.getElementById("count").style.border="none";
document.getElementById("count").style.width="18px";
function countdown(){
num=num-1;
document.getElementById("count").value=num;
if(num<=0){window.open("https://www.imooc.com","_self","width=1000,height=500");}
}
setInterval("countdown()",2000);
function goback(){
window.history.back();
}
</script>
</body>
</html>