当前位置: 代码迷 >> Java Web开发 >> js获取框架对象而且fadeIn
  详细解决方案

js获取框架对象而且fadeIn

热度:15   发布时间:2016-04-14 08:59:47.0
js获取框架对象并且fadeIn
主框架为
<frameset rows="75,*" cols="*" frameborder="no" border="0" framespacing="0" noresize="noresize" id="allbody">
    <frame src="<%=basePath%>/head" name="topFrame" id="topFrame" scrolling="no" noresize="noresize" title="headFrame" marginwidth="0" marginheight="0" />
    <frame src="<%=basePath%>/main" name="mainFrame" id="mainFrame" noresize="noresize" title="mainFrame" marginwidth="0" marginheight="0" />
</frameset>

mainFrame为
<table cellpadding="0" cellspacing="0" class="main-table">
    <tbody><tr>
        <td id="leftMenu" class="left-menu">
            <iframe id="menuIframe" class="left-menu-frame" src="<%=basePath%>medicationTemplate/leftList" width="160px" height="100%" frameborder="0"></iframe>
        </td>
       <td class="switch">
            <div class="sidebar-toggler opened">
                <span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>
            </div>
        </td>
        <td id="rightContent">
            <iframe src="<%=basePath%>addMedicationGo" width="100%" height="100%" frameborder="0" id="rightFrame">
            </iframe>
        </td>
    </tr>
    </tbody>
</table>

问题是我现在在addMedicationGo页面内怎么获取父框架对象allbody,然后fadeIn(100)呢 求大神们解答了

------解决思路----------------------
引用:
Quote: 引用:

top.document.getElementById("allbody")
不行啊,加了.fadeIn(100)就不行了 是不是没有这个属性啊

fadeIn这个方法是jquery的方法吧,你需要转换成jquery对象$(obj)