为什么我的速度是翻倍的在算的
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<h2>操作完成</h2>
<p><a id="num1">10</a>秒后返回主页<a href="javascript:goBack();">返回</a></p>
<script type="text/javascript">
var num = 10;
var time = null;
clearInterval(time);
function back1(){
var num2 = document.getElementById("num1");
num2.innerHTML=num;
num--;
setInterval("back1()",1000)
/*if(num!==0){
window.location.href="http://www.baidu.com";
clearInterval("back1()")
}
else{
}
*/
}
setTimeout("back1()",1000)
function back2(){
window.history.go(-1);
}
</script>
</body>
</html>