如何在同一iframe中打开iframe链接? [英] How to open a iframe link within the same iframe?
本文介绍了如何在同一iframe中打开iframe链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当用户点击它在iframe之外打开的链接时,我必须在包含某些链接的iframe内加载服务器URL。但我想在同一个iframe中打开它。
这怎么可能? 您应该指定目标名称。
< iframe src =demo_iframe.htmname =iframe_a>< / iframe>
< p>< a href =http://www.w3schools.comtarget =iframe_a> www.google.com< / a>< / p>
I have to load outside server URL within iframe which has some links, when user clicks on a link it opens outside the iframe. But I want to open it within the same iframe.
How is it possible?
解决方案
You should specify target name of the iframe.
<iframe src="demo_iframe.htm" name="iframe_a"></iframe>
<p><a href="http://www.w3schools.com" target="iframe_a">www.google.com</a></p>
这篇关于如何在同一iframe中打开iframe链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文