感觉还可以,纯自己写的!
<!DOCTYPE HTML>
<html>
<head>
<title>跳转网面</title>
<style>
#p2,#p1,#a1{display:inline;}
</style>
<script type="text/javascript">
var i=5
function ad()
{document.getElementById("p1").innerHTML=i+"秒后回到主页"
i--
setTimeout("ad()",1000)
if(i==0)
{location.assign("http://www.imooc.com")}
}
function ad1()
{
window.history.back()
}
</script>
</head>
<body onload="ad()">
<h3>操作成功</h3>
<p id="p1"></p>
<p id="p2"><a href="javascript:ad1()">返回</a></P>
</body>
</html>