开发者

Enforce iframe to open its links inside the frame

Is there a way to enforce iframe to open its target="_blank" links inside the frame and开发者_StackOverflow中文版 not open a new window/browser-tab?

Thanks.


You can write a bit of JavaScript, made easier using a framework such as jquery, that just removes that attribute from each link on the page. Does that suffice?

UPDATE: OK, so following your clarification, and having done a quick test, I believe the answer is "no". You'll get a permission denied error when trying to access the iframe's document via javascript.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜