为了账号安全,请及时绑定邮箱和手机立即绑定

我这个不会自动倒计数,是什么问题 大神求帮个忙啊

我这个不会自动倒计数,是什么问题 大神求帮个忙啊

铃铛3 2016-06-19 14:03:54
<!DOCTYPE html><html> <head>  <title>浏览器对象</title>    <meta http-equiv="Content-Type" content="text/html; charset=gkb"/>    </head> <body>  先编写好网页布局  <h1>操作成功</h1>    <span id="oddd" >5</span>  <span>秒后回到主页</span>  <a href="javascript:back();">返回</a>     <script type="text/javascript">      //获取显示秒数的元素,通过定时器来更改秒数。var num = document.getElementById("oddd").innerHTML;function block(){    document.getElementById("oddd").innerHTML=num;    num--;    if(num==0){        window.location.assign("http://www.imooc.com/")    }    setTimeout("block()",1000);function back(){    window.history.back();}   //通过window的location和history对象来控制网页的跳转。    </script> </body></html>
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 1324 浏览
慕课专栏
更多

添加回答

举报

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