差一个5 4 3 2 1 那个计时器死活输出不出来,救命
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script>
setInterval(myfunction,5000);
setInterval(bb,1000);
function bb() {
for(var i=5;i>=1;i--){
document.getElementById("demo").innerHTML=i;
}
}
function myfunction() {
window.open('http://www.imooc.com/u/5679319/courses','_self','width=200,height=300')
}
function aa(){
window.history.forward()
}
</script>
</head>
<body>
<h3>操作成功</h3>
<span id="demo"></span>
<span id="demc">秒后回到主页</span>
<a href="" onclick="aa()">返回</a>
</body>
</html>