无法倒计时怎么回事?
<!DOCTYPE html>
<html>
<head>
<title>浏览器对象</title>
<meta http-equiv="Content-Type" content="text/html; charset=gkb" />
<style type="text/css">
</style>
</head>
<body>
<h3>操作成功</h3>
<p><b id="time">5</b>秒后回到主页<a href="javascript:history.back()">返回</a></p>
<script type="text/javascript">
var num = document.getElementById("time").innerHTML
var function clock(){
if(num > 1){
document.getElementById("time'").innerHTML = --num;
}
else{
location.assign("http://www.imooc.com");
}
}
var i = setInterval(clock, 1000);
</script>
</body>
</html>