无论你将来用什么语言做网页,都要先学习HTML(超文本标识语言),一种很简单的语言,也是网页设计的'基础,找本自己能看懂的教材,浏览为主,不用记住所有的概念,以下是小编整理的iframe调用父页面方法,欢迎来阅读!
x();//xxxxx()代表父页面方法
具体列子如下,其中包括easyUI的右键和单击事件
body部分代码
<body class="easyui-layout">
<!-- 左侧目录 -->
<p
data-options="region:'west',split:true,title:'主题',iconCls:'icon-arrowIn'"
style="width: 270px; background: #efefef">
<!-- 目录数 -->
<ul id="tree" class="easyui-tree"></ul>
</p>
<input type="hidden" value="${ }" id="themeType"/>
<!-- 右侧窗体 -->
<p
data-options="region:'center',title:'内容显示',iconCls:'icon-arrowOut'" style="overflow: hidden">
<iframe name="leftIframe" id="leftIframe" src="" frameborder="0" height="100%" width="100%"></iframe>
</p>
<!-- 右键菜单 -->
<p id=rightCliMean class="easyui-menu" style="width:120px;">
<p onclick="updateTheme();" data-options="iconCls:'icon-edit'" >修改</p>
<p onclick="removeObjectNode();" data-options="iconCls:'icon-tip'" >删除</p>
</p>
<script type="text/javascript">
loadTree();
</script>
</body>
js部分:
?
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();
})