这样写数字为什么不变?
<!DOCTYPE html>
<html>
<head>
<title>浏览器对象</title>
<meta http-equiv="Content-Type" content="text/html; charset=gkb"/>
</head>
<body>
<h4>操作成功</h4>
<p>
<b id="select">5</b>自动返回主页<a href="javaScript:goBack();">返回</a>
</p>
<script type="text/javascript">
var sel=document.getElementById("select");
var i=5;
function set(){
sel.innerHTML=i;
i--;
setTimeout("set()",1000);
if(i==1){
window.location.href="http://www.imooc.com";
}
}
function goBack(){
window.history.back();
}
</script>
</body>
</html>