zoukankan      html  css  js  c++  java
  • [转]Jquery实现页面定时跳转

     

      1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
      2. <html xmlns="http://www.w3.org/1999/xhtml">  
      3. <html>    
      4.   <head>    
      5.   <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />  
      6.     <title>跳转页面</title>     
      7.     <mce:script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" mce_src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></mce:script>      
      8.     <mce:script language="javascript"><!--  
      9.     
      10.         $(document).ready(function() {    
      11.             function jump(count) {    
      12.                 window.setTimeout(function(){    
      13.                     count--;    
      14.                     if(count > 0) {    
      15.                         $('#num').attr('innerHTML', count);    
      16.                         jump(count);    
      17.                     } else {    
      18.                         location.href="login.jsp";    
      19.                     }    
      20.                 }, 1000);    
      21.             }    
      22.             jump(3);    
      23.         });    
      24.       
      25. // --></mce:script>    
      26.   </head>        
      27.   <body>      
      28.     <span style="color:red" mce_style="color:red">欢迎来到******!</span><br/>页面将在3秒后跳转...<br/>还剩<span id="num">3</span>秒  
      29.   </body>    
      30. </html>  
  • 相关阅读:
    integer比较
    String比较
    StringBuffer的s1.capacity()是多少?
    时间复杂度
    京东面试--总结
    说下Java堆空间结构,及常用的jvm内存分析命令和工具
    linux下jmap,jstat和jstack使用
    jvm 性能调优工具之 jmap
    jstack(查看线程)、jmap(查看内存)和jstat(性能分析)命令
    android小技巧:在activity中实现与绑定的fragment的回调
  • 原文地址:https://www.cnblogs.com/ZhuRenWang/p/4801384.html
Copyright © 2011-2022 走看看