Solution: Just set the link's target attribute value to the same as the target framework name. Specific steps: 1: For frameset object. (1) Contains the code of the frame page. <frameset cols="100,*" name="frame1"> <frame src="1.htm" name="top"> <frame src="2.htm" name="main"> </frameset> (2) Link code of the frame loading page (1.htm or 2.htm): <a href="http://www.flash8.net" target="top">Open the link in the upper box</a> <a href="http://www.flash8.net" target="main">Open the link in the main frame</a> 2. The same usage applies to iframe. <iframe src="about:blank" name="left"></iframe> <iframe src="about:blank" name="right"></iframe> <a href="http://www.flash8.net" target="left">Open the link in the left frame</a> <a href="http://www.thugx.com" target="right">Open link in right frame</a> Tip: You can also achieve the same purpose by setting the location property value of the target frame in the script. like: <a href="http://www.flash8.net" onClick="document.frames['right'].location=this.href;return false">Open the link in the frame named right</a> Special note: After running this code, click the link and the link target will be opened in the specified frame or iframe. Figure 1.6.6 shows the effect of the link opening in the specified iframe after clicking the link. ![]() Figure 1.6.6 Open the link target in the specified iframe Special Notes This example mainly uses the target attribute of the link and the name attribute of the frame. When the values of the two attributes are the same, the link target is opened in the frame. target Sets or gets the window or frame in which the target content is to be displayed. name Sets or gets the name of the frame. |
<<: Sharing ideas on processing tens of millions of data in a single MySQL table
>>: How to use nginx to configure access to wgcloud
Table of contents 1. Variable Overview 1.1 Storag...
1. The ENV instruction in the Dockerfile is used ...
Simply pull the image, create a container and run...
This article mainly introduces several scheduling...
<br />Original text: http://andymao.com/andy...
Table of contents Single condition single data fi...
js array is probably familiar to everyone, becaus...
What is HTTP Compression Sometimes, relatively la...
The solutions to the problems encountered during x...
Utilize the browser's non- overflow:auto elem...
This article shares the specific steps of replaci...
Adding the right VS Code extension to Visual Stud...
1. Trash or Classic? Web technology updates very ...
There are too much knowledge to learn recently, a...
Anyone who has a little knowledge of data operati...