我正在寫一個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中打開鏈接?