为什么计时器不起作用?
<script type="text/javascript">
window.onload=function(){
var oSe=document.getElementById("second");
var num=oSe.innerHTML;
function count(){
num--;
oSe.innerHTML=num;
if (num==0) {
location.assign("www.imooc.com");
}
}
setInterval("count()",1000);
}
</script>
</head>
<body>
<h2>操作成功</h2>
<span id="second">5</span>
<span>秒后自动跳转</span>
</body>
</html>
为什么计时器不起作用