<iframe src="http://astore.amazon.com/itbumobile-20?wmode=transparent" width="100%" height="6000" frameborder="0" scrolling="no"></iframe>
在此 iframe 中,新链接在父窗口内打开。
<iframe src="http://www.w3schools.com" width="100%" height="6000" frameborder="0" scrolling="no" wmode="Opaque"></iframe>
在此 iframe 中,新链接不会在父窗口内打开。
但是两个iframe的编码方式好像是一样的。不同行为的实际技巧是什么?
最佳答案
<a href="http://en.wikipedia.org" target="_top">Top</a>
<a href="http://en.wikipedia.org" target="_self">Self</a>
target
的魔力:http://jsfiddle.net/DerekL/wxcufehg/
关于javascript - 是什么导致 iframe 在父窗口中打开新链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26092961/