Disabling target=“_blank” in iframe from opening new window? (or possible work arounds)?

允我心安 提交于 2019-12-24 12:08:24

问题


I have an issue-

I'm creating an html 5 app and including external websites in with an iframe. Inside the external website some of the links have

target="blank"

When clicked, this exits out of my app and opens up and entirely new window. Ideally, I want to keep them inside the iframe which allows them to use my app navigation (and is the point of an app).

Unfortunately I don't think I'm going to be able to achieve this with frontend technology alone. I'm looking for ANY solution. What I need is to basically get the "iframe" to act as its own window and my nav to be an entirely separate piece.

My current code base is html5, css, javascript, php (but possibly looking into integrating in node.js).



Here is a fiddle showing the issue: http://jsfiddle.net/zmx9e/

来源:https://stackoverflow.com/questions/20601259/disabling-target-blank-in-iframe-from-opening-new-window-or-possible-work-a

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!