我正在写一个cordova应用程序,该应用程序适用于android,ios和web。如何通过iframe中的链接打开新窗口
在我使用iframe的应用程序中,我在加载html页面(从我们的服务器,我可以在必要时操作)。 所以我目前正在使用的iframe,如:
<iframe sandbox="allow-scripts allow-same-origin allow-top-navigation" name="iframe" frameBorder="0" seamless="seamless" src="http://www.ourserver.com/file.html" />
在这些HTML文件,我有联系,这是我想在新窗口中打开。我写了一个处理链接打开的函数,可以从iframe之外的window.openLink(url)
到达。 任何想法如何从iframe中打开链接?