1. Application scenarios Parent page a.jsp
Child page b.jsp, as the page pointed to by the iframe embedded in page a
Now an operation is done in page b. After the operation is completed, the iframe embedded in page a needs to be refreshed.
2. Ideas Find page a in page b, then find the iframe in page a, and reassign the src attribute of iframe.
3. Implementation in b.jsp
function refresh(){
var frame = window.parent.document.getElementById("frame");
var path = frame.getAttribute ("src");
frame.setAttribute("src", path);
}
This only refreshes the frame, which is a partial refresh effect.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn