14 December 2013

How to open multiple links in iframes

In HTML , iframe tag is used as a nested browser inside a page where you can view another website without changing the page.

To open links to a targeted iframe in the same page , you need to use target attribute inside a tag .

Sample code :

<iframe height="200" name="frm" width="300"></iframe>
<br />
<a href="http://www.bdnews24.com/" target="frm">Bdnews24</a>
<br />
<a href="http://www.bangladesh-data.blogspot.com/" target="frm">Bangladesh blog</a>

Output may look like this:

iframe snapshot

(If you found this article useful then share with your friends.)

No comments: