Tag:--enter button contains point cell one mode service
The 1,reload method, which forces the browser to refresh the current Page.
Syntax: Location.reload ([bforceget])
Parameters: bforceget, Optional parameter, default is false, the current page is taken from the client Cache. true, the latest page from the server is taken as a GET, equivalent to the client clicking F5 ("refresh")
| |
<script language=" JavaScript "> Window.location.reload (); </script> |
This will enable the page refresh, of course, there are other ways, then to refresh the framework page how we do
| The code is as follows |
|
Method 1
document.getElementById (' Frameid '). contentWindow.location.reload (true);
Method 2 document.getElementById (' youriframe '). src=src; |
Instance:
| code is as follows |
|
<iframe id=" myframe "width=" 100% "frameborder=" 0 "src=" test.html "scrolling=" no "></ IFRAME> <input type= "button" onclick= "javascript:refreshframe ();" value= "Refresh Frame"/> <script type= "text/javascript" > <!-- function refreshframe () { document.getElementById (' myframe '). contentWindow.location.reload (true); } //--> </script |
Two. jquery implements forced refresh
$ (' #iframe '). attr (' src ', $ (' #iframe '). attr (' src '));
third, if it is open new page we want to refresh, you can use the following code to brush the pro
| The code is as follows |
|
Refresh the page containing the frame with <script language=javascript> Parent.location.reload (); </script> child window refreshes parent window <script language=javascript> Self.opener.location.reload (); </script> (or <a href= "javascript:opener.location.reload ()" > Refresh </a>) Refresh the page of another frame with <script language=javascript> Parent. another FrameID.location.reload (); </script> |
Summary: a lot of document.frames (' ifrmname ') on the internet. location.reload () is no longer available.
source: http://www.3lian.com/edu/2014/10-18/173159.html
From for Notes (Wiz)
How jquery refreshes the IFRAME page