. Method two, write window.location.reload(true) in js;"/> . Method two, write window.location.reload(true) in js;">
Home >Java >javaTutorial >How to set refresh page in jsp
This article will introduce how to set up JSP to refresh the page. In fact, there are many methods, but they must be adapted to local conditions to achieve better results.
Method 1
<metahttp-equiv="refresh"content="10;url=跳转的页面">
10 means refreshing every 10 seconds
Method 2
<scriptlanguage=''javascript''> window.location.reload(true); </script>
If you want to refresh an iframe, replace window with the name or ID number of the frame
Method 3
<scriptlanguage=''javascript''> window.navigate("本页面url"); </script>
Method 4
function abc() { window.location.href="/blog/window.location.href"; setTimeout("abc()",10000); }
Refresh this page:
Response.Write("<scriptlanguage=javascript>window.location.href=window.location.href;</script>")
Refresh the parent page:
Response.Write("<scriptlanguage=javascript>opener.location.href=opener.location.href;</script>")
Summary of refresh page implementation methods (HTML, ASP, JS)
##Refresh regularly:
<script>setTimeout("location.href='url'",2000)</script>Description: url is the URL address of the page to be refreshed
<meta name="Refresh"content="n;url">Description:
<%response.redirect url%>Description: Generally, a url parameter or form value is used to determine whether it occurs. An operation, and then refresh using response.redirect.
The above is the detailed content of How to set refresh page in jsp. For more information, please follow other related articles on the PHP Chinese website!