FKdelphi

JAVA-JSP内置对象之response对象实现页面自动刷新

 

相关资料:
《21天学通Java Web开发》

response对象

实现页面自动刷新
1.可以通过response对象的addIntHeader()方法添加一个标题为Refrsh的标头,并指定刷新间隔时间,从而实现页面自动刷新。

 

ResponseDemo2.jsp

 1 <%@ page language="java" contentType="text/html;charset=gb2312" %>
 2 <html>
 3 <head>
 4   <title>设置页面自动刷新</title>
 5 </head>
 6 <body>
 7   <%-- 使用response对象的setIntHeader实现页面自动刷新 --%>
 8   <%
 9     response.addIntHeader("Refresh",10);
10   %>
11   <h4>该页面10秒后自动刷新</h4>
12 </body>
13 </html>
View Code

 

分类:

技术点:

相关文章:

  • 2021-05-23
  • 2021-10-19
  • 2021-12-18
  • 2021-12-22
  • 2021-04-27
  • 2021-10-19
  • 2022-01-15
  • 2021-12-06
猜你喜欢
  • 2021-12-05
  • 2022-01-09
  • 2021-11-03
  • 2021-11-02
  • 2021-06-01
  • 2022-01-15
  • 2021-11-29
相关资源
相似解决方案