问答详情
源自:8-17 编程练习

时间不动a

<!DOCTYPE html>

<html>

<head>

    <title>浏览器对象</title>

    <meta http-equiv="Content-Type" content="text/html; charset=gkb" />

    <style type="text/css">

    </style>

</head>

<body>

  <h2>操作成功</h2>

  <p><span id=time>5</span>秒后跳转到主页<a href="javascript:history.back()">返回</a></p>

  <script>

      var i=document.getElementById("time").innerHTML;

      var n=seInterval("if(i>0){document.getElementById('time').innerHTML=--i;}else{location.assign("http://www.imooc.com/"),1000);

  </script>

</html>


提问者:慕粉4296528 2016-12-09 22:34

个回答