隐藏在面板的iFrame /格对象 [英] Hide the iFrame Under Panel / Div Object

查看:83
本文介绍了隐藏在面板的iFrame /格对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你可以在我的形象看,我有一个jQuery的滑动菜单(这是DIV /面板)沿PDF(这是在iFrame中)与其他的iFrame一起..我想隐藏滑动菜单的iFrame(本之所以将面板下的iframe,因为如PDF浏览器的行为面板自动隐藏在PDF阅读器并不会在表单上可见)。对于我试着设置显示属性=无;它没有工作:(有没有办法隐藏的iFrame但小组应该在自己的位置。

As you can see in my image I have Pdf (Which is in the iFrame) along with a Jquery Sliding Menu (Which is in the Div/Panel) along with another iFrame.. I want to hide Sliding Menu iFrame (The reason for adding Panel Under iframe because as pdf viewer behaviour panel will hide itself under Pdf and will not be visible on the form). For that I tried setting display attribute = none; which not worked :( Is there any way to hide the iFrame but the Panel should be at its place.

推荐答案

如果您在观看前pression越来越元素或使用Firebug检测not..you应该访问的iFrame这样

Use firebug to detect if you are getting element in watch expression or not..you should access iFrame like this

<form name="formname" .... id="form-first">
<iframe id="one" src="iframe2.html">
</iframe>
</form>


function iframeRef( frameRef ) {
return frameRef.contentWindow ? frameRef.contentWindow.document : frameRef.contentDocument
}

var inside = iframeRef( document.getElementById('one') )

这篇关于隐藏在面板的iFrame /格对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆