window.parent.xxxxx();//xxxxx() represents the parent page method
The specific columns are as follows, including the right-click and click events of easyUI
parent.jsp
Part of body code
<body> <!-- left directory --> <div data-options="region:'west',split:true,title:'theme',iconCls:'icon-arrowIn'"> <!-- number of directories--> <ul id="tree"></ul> </div> <input type="hidden" value="${param.type }" id="themeType"/> <!-- right form--> <div data-options="region:'center',title:'content display',iconCls:'icon-arrowOut'" style="overflow: hidden"> <iframe name="leftIframe" id="leftIframe" src="" frameborder="0"></iframe> </div> <!-- Right-click menu--> <div id=rightCliMean> <div onclick="updateTheme();" data-options="iconCls:'icon-edit'" >Modify</div> <div onclick="removeObjectNode();" data-options="iconCls:'icon-tip'" >Delete</div> </div> <script type="text/javascript"> loadTree(); </script> </body>js part:
function loadTree() { $('#tree').tree( { url : 'xxxxx.action, animate : true, lines : true, onContextMenu : function(e, node) { e.preventDefault(); $(this).tree('select', node.target); /** * Operation on the root node (default topic) cannot be performed*/ var parent = $(this).tree('getParent',node.target); if(parent){ if(node.text == 'default topic'){ $.messager.alert("Prompt message","Default topic cannot be operated!","warning"); return false; } $('#rightCliMean').menu('show',{ left: e.pageX, top: e.pageY }); } }, onClick:function(node) {//Standalone event var type = node.attributes.type; if("Schema" == type){ var themeType = $("#themeType").val(); $('#leftIframe').attr('src', 'xxxx.action'); return; } } }); } child.jsp/** * Refresh the left theme*/ $(function(){ window.parent.loadTree(); })