请大神看看我这计数器为啥不动哦,一直显示5秒
<!DOCTYPE html>
<html>
<head>
<title>浏览器对象</title>
<meta http-equiv="Content-Type" content="text/html; charset=gkb"/>
</head>
<body>
<!--先编写好网页布局-->
<p>
<strong>操作成功</strong><br/><br/>
<strong><span id="num" >5</span>
</strong>秒后回到主页
<a href="www.baidu.com">返回</a>
</p>
<script type="text/javascript">
var num=5;
var i=setInterval(showTime(),1000);
function showTime()
{
document.getElementById("num").innerHtml =num;
num--;
if(num==0)
{
location.href="www.imooc.com";
clearInterval(i);
}
}
</script>
</body>
</html>