iframe link opens in a new window or on the original page
The function of iframe can embed a frame in a webpage to display the content of another webpage. Sometimes a designer will add other links to the embedded webpage. At this time, how to control the goal of the link is very important. It can be in the frame. Open a new webpage, open a new webpage in the parent layer, or open a new window directly. The link target itself is not the attribute of the iframe, but the category of the HTML a href link attribute . Designers can combine the two to determine the iframe What mode should the frame's link be opened in.
iframe link target
aims | definition |
_blank | The original window is retained, and a new window is opened to display the linked page. |
_self | Open directly in the iframe frame, and the display range of the linked webpage is in the iframe. |
_parent | Open the linked page in the parent layer, directly replacing the original frame page. |
The following will use test1.html to embed the framework test2.html which contains three different link targets.
Iframe link opening syntax, test1.html
Iframe link opening syntax, test2.html
<a href="link URL" target="_self">open within the frame</a>
<a href="link URL" target="_parent">Open in parent layer</a>
Post a Comment
0 Comments