<body> <h1> 操作成功 </h1> <span id="second">5</span> <span id=""> 秒后回到主页 </span> <a href="javascript:back()">返回</a> <script> var num = document.getElementById("second").innerHTML; function add() { --num; document.getElementById("second").innerHTML = num; if(num==0) { location.assign('http://www.imooc.com'); } } setInterval("add()", 1000); function back() { window.history.back(); } </script> </body>
添加回答
举报
0/150
提交
取消