Use JavaScript to refresh the upper-level page and current page
Copy codeThe Code is as follows:
<Script type = "text/javascript">
// Refresh the superior page
// Specify parameter parent.main.doc ument. location. reload ();
// Refresh the current page
Document. location. reload ();
</Script>
Each frame element or iframe element is a framework. This framework is a window that loads an html document. The following methods can be used to reference the frame or iframe element:
Copy codeThe Code is as follows:
Window. frames [index]
Windows. frames ["framework name"]
Windows. Framework name
If you want to obtain a reference to the parent window from the webpage loaded by the framework, you can use the following method:
Copy codeThe Code is as follows:
Window. parent
To reference a framework in the parent window, you can use the following method:
Copy codeThe Code is as follows:
Window. parent. Framework name
You can also use the following method to obtain reference to the top frame of the parent window:
Copy codeThe Code is as follows:
Window. top
As long as you get a reference to the framework, you can control the framework object !!!