我的时间跳的不准啊!求助热心网友!哈哈!
<!DOCTYPE html>
<html>
<head>
<title>浏览器对象</title>
<meta http-equiv="Content-Type" content="text/html; charset=gkb"/>
</head>
<body>
<!--先编写好网页布局-->
<div>
<h2>操作成功</h2>
<input type="text" id="txt" style="border:none; width:8px;"/>秒后返回到主页
</div>
<script type="text/javascript">
var num=5;
function numCount(){
document.getElementById('txt').value=num;
num=num-1;
}
setInterval("numCount()",1000);
function a(){
window.open('http://www.imooc.com','_parent');
}
setInterval("a()",5000);
</script>
</body>
</html>