求大神帮忙看看哪里出问题了
<!DOCTYPE html>
<html>
<head>
<title>浏览器对象</title>
<meta http-equiv="Content-Type" content="text/html; charset=gkb"/>
</head>
<body>
<!--先编写好网页布局-->
<h1>操作成功!</h1>
<span id="one">5</span>
<span>s后返回主页</span>
<a href="javascript:back();">返回</a>
<script type="text/javascript">
//获取显示秒数的元素,通过定时器来更改秒数。
var num=document.getElementById('one').innerHTML;
function a()
{
document.getElementById('one').innerHTML=num;
num--;
if(a==0)
{
location.assign("www.imooc.com");
}
}
setTimeout(a(),1000);
//通过window的location和history对象来控制网页的跳转。
function b()
{
window.history.back();
}
</script>
</body>
</html>