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

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <html> 
      <head> 
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
        <title>跳转页面</title>  
        <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>   
        <mce:script language="javascript"><!--
     
            $(document).ready(function() { 
                function jump(count) { 
                    window.setTimeout(function(){ 
                        count--; 
                        if(count > 0) { 
                            $('#num').attr('innerHTML', count); 
                            jump(count); 
                        } else { 
                            location.href="login.jsp"; 
                        } 
                    }, 1000); 
                } 
                jump(3); 
            }); 
       
    // --></mce:script> 
      </head>     
      <body>   
        <span style="color:red" mce_style="color:red">欢迎来到******!</span><br/>页面将在3秒后跳转...<br/>还剩<span id="num">3</span>秒
      </body> 
    </html>

  • 相关阅读:
    Codeforces 1009F Dominant Indices
    C++之++运算符重载问题
    Codeforces 1010D Mars rover
    这是一个开始
    MoreEffectiveC++Item35(异常)(条款9-15)
    C++隐式类类型转化
    MoreEffectiveC++Item35(操作符)(条款5-8)
    MoreEffectiveC++Item35(基础议题)(条款1-4)
    php+mysql网站无限级栏目分类-递归获取树形结构函数
    JavaScript简易动画
  • 原文地址:https://www.cnblogs.com/helloyb/p/3012776.html
Copyright © 2011-2022 走看看