How to open new links outside the iframe?

Is there a way to make an iframe act as if it were part of a page. For example, when I click on a link, it will either open the links in a new tab / window by default, or make it so that when the link is clicked, it will open in the same window, but not only in the iframe?

+5
source share
2 answers

You can just set the attribute target. To open in the current top window (top frame):

<a href="http://example.com" target="_top">Link Text</a>

Or open in a new window:

<a href="http://example.com" target="_blank">Link Text</a>

There also _parentfor the parent window (not necessarily the top one) and _selffor the current window (default).

+13
source

, iframe?

target=_top .

+1

All Articles