Reputation: 57
I have an iframe
in my page and I want to display the content according to the link (anchor tag) selected. I would like to achieve this using javascript.
My doubts are:
Upvotes: 0
Views: 1003
Reputation: 2824
Give your iframe a name
attribute, IE:
<iframe src="startpage.html" name="content"></iframe>
Then when you create your links, set the target
attribute to the same value. IE:
<a href="nextpage.html" target="content">Next Page</a>
Upvotes: 1