- <script>
- $(function(){
- var num = 15;
- var interval = Windows.setInterval(function(){
- $("#time> span").text(num);
- if(num> 0){
- num--;
- }else{
- Windows.clearInterval(interval);
- document.location = "https://www.chinaobd2.com/";
- }
- },1000);
- });
- </script>
使用上面代码需要调用 jQuery, 不能单独使用, 初学者记得哦. 以上代码我们已经测试过了. 更多信息可以点这里
来源: http://www.bubuko.com/infodetail-3052165.html