为了账号安全,请及时绑定邮箱和手机立即绑定
<!DOCTYPE html>
<html>
 <head>
  <title>浏览器对象</title>  
  <meta http-equiv="Content-Type" content="text/html; charset=gkb"/>   
 </head>
 <body >
  <!--先编写好网页布局-->
  <h2 id="title">操作成功</h2>
   <h4 id="status"></h4>
 

  <script type="text/javascript">  
 var i = 5;
 var url = "http://www.imooc.com";
 //获取显示秒数的元素,通过定时器来更改秒数。
 function clock() {
     document.getElementById('status').innerHTML = i + "秒后返回到主页 <a href=" + url + ">返回</a>";
 	i = i - 1;
 	var go = setTimeout("clock()", 1000);
 	if (i < 0) {
 		clearTimeout(go);
 		//通过window的location和history对象来控制网页的跳转。
 		window.location.href = url;
 	}

 }

 clock();
 </script> 
  
</body>
</html>


正在回答

3 回答

老版本的应该是没有的

0 回复 有任何疑惑可以回复我~

ok,挺棒的


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信