zoukankan      html  css  js  c++  java
  • JSP中页面定时刷新


    1.JSP中页面定时刷新

    Java 代码
    1. <%  
    2.    //页面每隔30秒自动刷新一遍       
    3.    response.setHeader("refresh" , "30" );  
    4. %>  
    1. <%  
    2.    //页面每隔30秒自动刷新一遍       
    3.    response.setHeader("refresh","30");  
    4. %>  
    <%
       //页面每隔30秒自动刷新一遍    
       response.setHeader("refresh","30");
    %>
    



    2.JSP中页面定时刷新至另一个指定页面

    Java 代码
    1. <%  
    2.     //页面每隔30秒自动链接至另一页面   
    3.     response.setHeader("refresh" , "30;URL=http://www.sina.com" );  
    4. %>  
    1. <%  
    2.     //页面每隔30秒自动链接至另一页面   
    3.     response.setHeader("refresh","30;URL=http://www.sina.com");  
    4. %>  
    <%
        //页面每隔30秒自动链接至另一页面
        response.setHeader("refresh","30;URL=http://www.sina.com");
    %>
    
    
    



    3.<meta http-equiv="refresh" content="30">

    Java 代码
    1. <%@ page contentType= "text/html;charset=GBK"  %>  
    2. <%  
    3.   //页面每隔30秒自动刷新一遍       
    4.   response.setHeader("refresh" , "10;URL=http://www.sina.com" );  
    5.   
    6. %>  
    7. <html>  
    8.   <head>  
    9.     <title>My JSP 'index.jsp'  starting page</title>  
    10.     <!--  <meta http-equiv="pragma"  content= "no-cache" >  
    11.     <meta http-equiv="cache-control"  content= "no-cache" >  
    12.     <meta http-equiv="expires"  content= "0" >      
    13.     <meta http-equiv="refresh"  content= "30" > -->  
    14.     <script type="text/javascript" >  
    15.        alert("jsp" );  
    16.     </script>  
    17.   </head>  
    18.     
    19.   <body>  
    20.     This is my JSP page. <br>  
    21.   </body>  
    22. </html> 
  • 相关阅读:
    导航条按钮的设置UIBarButtonItem
    动态修改app build版本CFBundleVersion
    iOS应用图片尺寸制作脚本
    iPad所有平板型号屏幕尺寸
    一个小时学会Git
    NSLog的各种打印格式符和打印CGRect相关结构体
    Linux上统计文件夹下文件个数以及目录个数
    Privacy Description
    iOS开发微信支付的介绍与实现
    iOS开发苹果内购的介绍与实现
  • 原文地址:https://www.cnblogs.com/hy928302776/p/3484065.html
Copyright © 2011-2022 走看看