首页 > 代码库 > Jquery计时跳转

Jquery计时跳转

 <script type="text/javascript">        $(document).ready(function () {            function jump(count) {                window.setTimeout(function () {                    count--;                    if (count > 0) {                        $(‘#num‘).text(count);                        jump(count);                    } else {                        location.href = "index.aspx";                    }                }, 1000);            }            jump(5);        });      </script>  <span style="font-size: 14px">页面将在<span id="num">5</span>秒钟后自动跳转。</span>

 

Jquery计时跳转