附上代码
<!DOCTYPE html>
<html>
<head>
<title>浏览器对象</title>
<meta http-equiv="Content-Type" content="text/html; charset=gkb"/>
</head>
<body>
<!--先编写好网页布局-->
<h1>操作成功</h1>
<span id="time">5</sapn><span>秒后回到主页</span><a href="javascript:history.back()">返回</a>
<script type="text/javascript">
var num=document.getElementById("time").innerHTML;
function count()
{
num--;
document.getElementById("time").innerHTML=num;
if(num==0)
{
location.assign("www.imooc.com");
}}
setInterval("count()",1000);
//通过window的location和history对象来控制网页的跳转。
</script>
</body>
</html>
<span id="time">5</sapn> location.assign("www.imooc.com");
</span>打错了,还有url应该写成http://www.imooc.com