[英]Display iframe content according to link
I have an iframe
in my page and I want to display the content according to the link (anchor tag) selected. 我的页面中有一个
iframe
,我想根据所选的链接(锚标签)显示内容。 I would like to achieve this using javascript. 我想使用javascript实现。
My doubts are: 我的怀疑是:
Give your iframe a name
attribute, IE: 给您的iframe一个
name
属性,即IE:
<iframe src="startpage.html" name="content"></iframe>
Then when you create your links, set the target
attribute to the same value. 然后,在创建链接时,将
target
属性设置为相同的值。 IE: IE浏览器:
<a href="nextpage.html" target="content">Next Page</a>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.