我已经通过其他类似的问题解决了这个问题,但不知何故在这种情况下,所有的解决方案都不起作用。iframe中的链接(不在弹出窗口中)不起作用
因此,这里是我的示例代码段的问题:
我有一个HTML文件,该文件是这样的:
<div id="portalRight">
<a target="_blank" href="http://ictforu.com"> <!-- this link works , it opens up another tab -->
<ul id="subtabnav">
<li class="datasetTab">
<a href="#">dataset</a> <!-- Click on this will trigger the dataset iframe to be loaded thru a servlet call -->
</li>
<li class="obsGraphTab" data-bind="css: { disabled: !aekos.subTabViewModel.graphTabsEnabled() }">
<a href="#">Observation Graph</a>
</li>
.....
</ul>
<div id="dataset">
<iframe id="dataset-frame" class="graphiframe" seamless sandbox="allow-same-origin allow-scripts"></iframe>
</div>
<div id="testViewer">
<iframe id="test-viewer-frame" class="graphiframe" seamless sandbox="allow-same-origin allow-scripts"></iframe>
</div>
</div>
正如你可以看到我的iframe是不是一个弹出,但下一个div出现元素:Iframe内容在单击链接时使用servlet填充。
我的Iframe在iframe的标题下有基本标记(base target =“_ parent”)。
我已经使用标签来指定行为,并且链接有target =“_ blank”,但我的链接根本不起作用。 同一链接在iframe之外工作。
例如IFRAME:
base target="_parent" /base
主体内容:
a target="_blank" href="http://ictforu.com" /a
此链接不起作用,点击将被忽略。
任何帮助,非常感谢。
对不起,有一些编辑isseus与html标签早些时候。
感谢, 马杜
你能提供的将出现在iframe代码的例子吗? – showdev