iframe呼叫父頁面的方法

來源:文萃谷 1.71W

貴有恆何必三更眠五更起,最無益只怕一日曝十日寒。 以下是小編為大家搜尋整理的'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();})

熱門標籤