Use JavaScript to refresh the upper-level page and the current page
<script type="text/javascript"> //刷新上级页面 //window.parent.main.document.location.reload(); //刷新当前页面 document.location.reload(); </script>
Each frame element or iframe element is a frame. This frame is a window, and an html document is loaded in this window. Use the following methods You can reference frame or iframe elements:
window.frames[index] windows.frames["框架名"] windows.框架名
If you want to get a reference to the parent window from the web page loaded by the frame, then you can use the following method:
window.parent
If you want to get a reference to the parent window If you have a reference to a frame in the window, you can use the following method:
window.parent.框架名
You can also use the following method to get a reference to the top frame of the parent window:
window.top
More js For related articles, please pay attention to the PHP Chinese website!