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.
精彩评论