Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的页面中有一个iframe,我想根据选择的链接(锚标记)显示内容。我想使用javascript来实现这一点。
iframe
我的疑问是:
给你的 iframe 一个name属性,IE:
name
<iframe src="startpage.html" name="content"></iframe>
然后,当您创建链接时,将target属性设置为相同的值。IE:
target
<a href="nextpage.html" target="content">Next Page</a>