简体   繁体   English

如何在HTML iframe中隐藏元素?

[英]How to hide an element inside HTML iframe?

I have a page that have toolbar at top and an iframe below the toolbar. 我有一个页面,该页面的顶部为工具栏,而其下方为iframe。 It is Stumbleupon style. 这是Stumbleupon风格。 Some web pages that are loading into iframe has flash objects and those open on my modal div. 载入iframe的某些网页包含Flash对象,而在我的模式div中打开的对象。 How can I hide flash objects in iframe? 如何在iframe中隐藏Flash对象? You may see it in action here: http://www.yemeklog.com/1-pakistana-yardim-zamani.html Please click on "Yorum" text on toolbar. 您可能会在这里看到它的运行情况: http ://www.yemeklog.com/1-pakistana-yardim-zamani.html请单击工具栏上的“ Yorum”文本。

You cannot modify the page content from pages that are on other domains. 您不能从其他域上的页面修改页面内容。 It is called the same origin policy . 这被称为同一来源策略

As mentioned here already, you cannot modify the pages when they're on other domains. 就像这里已经提到的,当页面位于其他域上时,您无法对其进行修改。

However, you can solve your problem by placing an iframe behind the modal div. 但是,您可以通过将iframe放在模式div后面来解决问题。 More info and an example (non jquery) you can find here: http://www.ozzu.com/website-design-forum/placing-div-over-flash-iframe-t94789.html 您可以在此处找到更多信息和示例(非jquery): http : //www.ozzu.com/website-design-forum/placing-div-over-flash-iframe-t94789.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM