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:
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>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.