码迷,mamicode.com
首页 > 其他好文 > 详细

Easyui使用记录

时间:2016-09-19 17:56:23      阅读:123      评论:0      收藏:0      [点我收藏+]

标签:

一天就这搞了这几行。

 

1. if else 可以嵌套;

2. 子页面调用父页面js,需要使用top.父页面js的方法。

 

<script type="text/javascript">
$(document).ready(function() {
$(‘#tt‘).tree( {
onlyLeafCheck : true, 
onCheck : function(node, checked) {
if (node.text == ‘天地图影像‘) {
if (checked) {
top.setLayerAction("EarthTDTYX_1", true);
} else {
top.setLayerAction("EarthTDTYX_1", false);
}
} else if (node.text == ‘天地图注记‘) {
if (checked) {
top.setLayerAction("EarthTDTZHJ_1", true);
} else {
top.setLayerAction("EarthTDTZHJ_1", false);
}
} 
}
});
});
</script>

  

    <body>
        <div class="easyui-panel" style="padding: 5px">
            <ul id="tt" class="easyui-tree"
                data-options="url:‘util/easyUI/tree_data.json‘,method:‘get‘,animate:true,checkbox:true"></ul>
        </div>


    </body>

 

Easyui使用记录

标签:

原文地址:http://www.cnblogs.com/ys-wuhan/p/5885932.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!