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
Table of contents 1. Current situation 2. Create ...
What is it? Spring Boot is a sub-project of the S...
Introduction: Interface designer Joshua Porter pub...
Table name and fields –1. Student List Student (s...
Problem Description Recently, when I was building...
1. Purpose Through this article, everyone can und...
Table of contents 1. Background 2. Operation step...
For more exciting content, please visit https://g...
Table of contents 1. Download 2. Installation 3. ...
The problem raised in the title can be broken dow...
This article shares the specific code of js to re...
1. Modify MySQL login settings: # vim /etc/my.cnf...
How to create a virtual machine on VMware and ins...
In Linux, there are two types of file connections...
Table of contents 01 Introduction to YAML files Y...