HTML js 页面倒计时后跳转至新页面
2021-02-01 20:13
标签:跳转 style round asc 备份 hang div change bsp HTML: HTML js 页面倒计时后跳转至新页面 标签:跳转 style round asc 备份 hang div change bsp 原文地址:https://www.cnblogs.com/weijie0717/p/13178197.html 1 body>
2 p>操作错误!还有span id="sp">5span>秒跳转到交换机备份页面...p>
3 a href="#" onclick="stop()">停止a>
4
5 script type="text/javascript">
6 var i=5;
7 function changeTime(){
8 document.getElementById("sp").innerHTML=i;
9 i--;
10 }
11 changeTime();
12 var inId=window.setInterval("changeTime()",1000);
13 function stop(){
14 window.clearInterval(inId);
15 }
16 function autoRedirect(){
17 window.location="{% url ‘sw_mgmt:sw_br‘ %}"; //跳转页面设置
18 }
19 window.setInterval("autoRedirect()",5000);
20 script>
21
22 body>
文章标题:HTML js 页面倒计时后跳转至新页面
文章链接:http://soscw.com/index.php/essay/49634.html