<!DOCTYPE html><html> <head> <title>浏览器对象</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> </head> <body> <h4>操作成功</h4> <p> <b id="second">5</b>秒后回到主页 <a href="javascript:void(0)" onclick="goback()">返回</a> </p> <script type="text/javascript"> var sec=document.getElementById("second"); var i=5; function func(){ i--; sec.innerHTML=i; if(i==1){ window.location.href="http://www.baidu.com"; } } var s=setInterval("func()",1000); function goback(){ window.history.back(); } </script> </body></html>
添加回答
举报
0/150
提交
取消