好的,问题是当您单击左侧 iframe 中的链接时,我希望它在右侧 iframe 中打开。当您第一次单击左侧边栏中的链接时,这一切都很好。但是,当您第二次单击该链接(在左侧边栏中)时,它将在新的浏览器选项卡中打开。我怎样才能让它在正确的框架中不断打开?
提前致谢, 和平
index.html http://pastebin.com/u6DqDA1q
left_frame.html http://pastebin.com/UuZYtdYs
最佳答案
是的,它应该工作得很好,iframe 1 中的链接需要有目标等于目标 iframe 的名称。
例如:
内嵌框架 1
<iframe src=""></iframe>
目标 iframe
<iframe name="iframe2"></iframe>
Iframe 1 的内容
<a href="" target="iframe2">Link opens in iframe 2</a>
同时检查我找到的这个链接
http://www.trans4mind.com/personal_development/HTMLGuide/iframes3.htm
关于HTML 和 iFrame,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13918872/