prevent html page from open a new window

2019-08-10 03:46发布

问题:

I have a html based application and sometimes my html app needs to open another url in iframe. the problem is that the third party url in the iframe open a new window too with the same content, the same url. so how can i prevent it?

回答1:

This seems like an iframe breakoutscript in the thirdparty page. A few links about a solution to this problem.

http://stuntsnippets.com/prevent-iframe-breakout/

http://www.zimbio.com/Web+Design/articles/1110/How+prevent+iFrame+breakaway

How to prevent IFRAME from redirecting top-level window