贵有恒何必三更眠五更起,最无益只怕一日曝十日寒。 以下是小编为大家搜索整理的'iframe调用父页面的方法,希望能给大家带来帮助!更多精彩内容请及时关注我们应届毕业生考试网!
1
class="gutter" style="BORDER-TOP: 0px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; OUTLINE-WIDTH: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; OUTLINE-STYLE: none; PADDING-LEFT: 0px; MARGIN: 0px; BORDER-LEFT: 0px; OUTLINE-COLOR: invert; PADDING-RIGHT: 0px"> | x(); //xxxxx()代表父页面方法 |
具体列子如下,其中包括easyUI的右键和单击事件
body部分代码
1234567891011121314151617181920212223 | < body class = "easyui-layout" > <!-- 左侧目录 --> < div data-options = "region:'west',split:true,title:'主题',iconCls:'icon-arrowIn'" style = "width: 270px; background: #efefef" > <!-- 目录数 --> < ul id = "tree" class = "easyui-tree" ></ ul > </ div > < input type = "hidden" value = "${ }" id = "themeType" /> <!-- 右侧窗体 --> < div data-options = "region:'center',title:'内容显示',iconCls:'icon-arrowOut'" style = "overflow: hidden" > < iframe name = "leftIframe" id = "leftIframe" src = "" frameborder = "0" height = "100%" width = "100%" ></ iframe > </ div > <!-- 右键菜单 --> < div id = rightCliMean class = "easyui-menu" style = "width:120px;" > < div onclick = "updateTheme();" data-options = "iconCls:'icon-edit'" >修改</ div > < div onclick = "removeObjectNode();" data-options = "iconCls:'icon-tip'" >删除</ div > </ div > < script type = "text/javascript" > loadTree(); </ script > </ body > |
js部分:
?
1234567891011121314151617181920212223242526272829303132333435363738394041 | function loadTree() { $( '#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) { //单机事件 var type = ; if ( "Schema" == type){ var themeType = $( "#themeType" )(); $(' #leftIframe')('src', 'on'); return ; } } }); }
/** * 刷新左侧主题 */ $( function (){ Tree(); }) |