1,在javascript中使用
<script language="javascript"> setTimeout("self.location.reload();",1000); <script> 1000毫秒刷新一次
2.在jsp head中 <% response.setHeader("refresh","1000"); %> 每一秒刷新一次
3,在html中的META中设置: META HTTP-EQUIV="Refresh" content="1000; URL=http://URL"> 每一秒刷新一次
4,struts中的刷新
在struts-config.xml中 <forward name= "success " path= "/xxxx.jsp " contextRelative= "true " redirect= "true " />
5,另外可以通过调用方法来刷新
<script language="javascript"> setTimeout("initpage();",1000); <script>
function initpage()
{
document.form.action="index.do?method=init
document.form.submit();
}
一秒就从新调用一次方法进行加载