iframe调用父页面的方法

来源:文书网 1.89W

贵有恒何必三更眠五更起,最无益只怕一日曝十日寒。 以下是小编为大家搜索整理的'iframe调用父页面的方法,希望能给大家带来帮助!更多精彩内容请及时关注我们应届毕业生考试网!

iframe调用父页面的方法

1

x();//xxxxx()代表父页面方法

具体列子如下,其中包括easyUI的右键和单击事件

body部分代码

1234567891011121314151617181920212223<bodyclass="easyui-layout"><!-- 左侧目录 --><divdata-options="region:'west',split:true,title:'主题',iconCls:'icon-arrowIn'"style="width: 270px; background: #efefef"><!-- 目录数 --><ulid="tree"class="easyui-tree"></ul></div><inputtype="hidden"value="${ }"id="themeType"/><!-- 右侧窗体 --><divdata-options="region:'center',title:'内容显示',iconCls:'icon-arrowOut'"style="overflow: hidden"><iframename="leftIframe"id="leftIframe"src=""frameborder="0"height="100%"width="100%"></iframe></div><!-- 右键菜单 --><divid=rightCliMeanclass="easyui-menu"style="width:120px;"><divonclick="updateTheme();"data-options="iconCls:'icon-edit'">修改</div><divonclick="removeObjectNode();"data-options="iconCls:'icon-tip'">删除</div></div><scripttype="text/javascript">loadTree();</script></body>

js部分:

?

1234567891011121314151617181920212223242526272829303132333435363738394041functionloadTree() {$('#tree')( {url :'on,animate : true,lines : true,onContextMenu : function(e, node) {entDefault();$(this)('select', et);/*** 不可以对根节点(默认主题)进行操作*/var parent = $(this)('getParent',et);if(parent){if( == '默认主题'){$t("提示信息","默认主题不能进行操作!","warning");return false;}$('#rightCliMean')('show',{left: X,top: Y});}},onClick:function(node) {//单机事件vartype = ;if("Schema"== type){varthemeType = $("#themeType")();$('#leftIframe')('src', 'on');return;}}});}/*** 刷新左侧主题*/$(function(){Tree();})

热门标签