Using Anchors with IFrames
suggest changeNormally a change of page within an iframe is initiated from within the iframe, for example by clicking a link inside it. It is also possible to change an iframe’s content from outside the iframe. You can use an anchor tag whose href attribute is set to the desired URL and whose target attribute is set to the iframe’s name attribute.
<iframe src="webpage.html" name="myIframe"></iframe>
<a href="different_webpage.html" target="myIframe">Change the Iframe content to different_webpage.html</a>
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents