1. Application Scenarios Parent page a.jsp Subpage b.jsp, as the page pointed to by the iframe embedded in page a Copy code The code is as follows:<body> <iframe id="frame" src="b.jsp" .../> </body> Now an operation is performed 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 the iframe. 3. Implementation In b.jsp Copy code The code is as follows:function refresh(){ var frame = window.parent.document.getElementById("frame"); var path = frame.getAttribute("src"); frame.setAttribute("src", path); } This only refreshes the frame, achieving a partial refresh effect. |
<<: How to pass parameters to JS via CSS
>>: Typical cases of MySQL index failure
When installing nginx, mysql, tomcat and other se...
Table of contents question extend Solving the pro...
Table of contents Two ways to solve the problem o...
Introduction to Dockerfile Docker can automatical...
Disadvantages of Tables 1. Table takes up more byt...
1. In the previous chapter, we learned that we ca...
1. The difference between the command > and &g...
swarm three virtual machines 132,133,134 1. Initi...
It is very simple to build a kong cluster under t...
This question is a discussion among netizens in a...
<br />This is not only an era of information...
Install mysql5.7.21 in the window environment. Th...
Preface During the development process, we often ...
Table of contents Main issues solved 1. The data ...
This article shares the MySQL precompilation func...