easyui combotree不让父级选中?

<ul id="combotree"></ul>
 $(function () {
$("#combotree").combotree({
width: 300,
data: [{
"id": 1,
"text": "My Documents",
"children": [{
"id": 11,
"text": "Photos",
"state": "closed",
"children": [{
"id": 111,
"text": "Friend"
}, {
"id": 112,
"text": "Wife"
}, {
"id": 113,
"text": "Company"
}]
}, {
"id": 12,
"text": "Program Files",
"children": [{
"id": 121,
"text": "Intel"
}, {
"id": 122,
"text": "Java",
"attributes": {
"p1": "Custom Attribute1",
"p2": "Custom Attribute2"
}
}, {
"id": 123,
"text": "Microsoft Office"
}, {
"id": 124,
"text": "Games",
"checked": true
}]
}, {
"id": 13,
"text": "index.html"
}, {
"id": 14,
"text": "about.html"
}, {
"id": 15,
"text": "welcome.html"
}]
}]
,
method: 'get',
ines: true,
multiple: true,
onBeforeCheck: function (node) {
//alert($("#combotree").combotree("tree").tree('isLeaf', node.target));
if (!$("#combotree").combotree("tree").tree('isLeaf', node.target)) {
return false;
}
}
})
})

关键代码:

onBeforeCheck: function (node) {
//alert($("#combotree").combotree("tree").tree('isLeaf', node.target));
if (!$("#combotree").combotree("tree").tree('isLeaf', node.target)) {
return false;
}
}

技术交流QQ群:15129679

最新文章

  1. LINK1123:failure during conversion to COFF:file invalid or corrupt
  2. python语言的优点和缺点
  3. paip.语义分析--单字词形容词表180个
  4. Creating, Stopping, Re-Starting and Deleting a Timer in Oracle Forms
  5. IT公司100题-9-判断整数序列是不是二元查找树的后序遍历结果
  6. 深入理解Linux内核-第七章 进程调度
  7. dbutils 执行sql返回的数据类型
  8. linux进程与端口查看命令
  9. JSP标准标签库(JSTL)--SQL标签库 sql
  10. centos 7 配置 到多站点设置
  11. IntelliJ IDEA 报错:找不到包或者找不到符号
  12. [Swift]LeetCode400. 第N个数字 | Nth Digit
  13. 基于C#.NET的高端智能化网络爬虫(二)(攻破携程网)
  14. Java 基本数据类型 &amp;&amp; 位运算
  15. ASIHTTPRequest缓存策略download cache
  16. Minimax-486. Predict the Winner
  17. git pull 总要求输入账号和密码解决?
  18. centos killall安装
  19. MySql C++调用库Connector/c++编译 和 接口封装【三】Connector/c++ 使用总结及封装
  20. UVA-10615 Rooks (二分图匹配)

热门文章

  1. Codedforces 1076G Array Game 线段树
  2. [CodeForces-585F]Digits of Number Pi
  3. 【openjudge】 CDQZ challenge 4
  4. BZOJ 1208: [HNOI2004]宠物收养所 SET的妙用
  5. BZOJ 1012: [JSOI2008]最大数maxnumber 单调队列/线段树/树状数组/乱搞
  6. Linux的本地时间和网络时间同步
  7. 一个.net下的轻量级的Serverless 文档数据库LiteDB
  8. Android peferenceActivity 自己定义标题简单方法
  9. WINDOWS WPA性能分析
  10. MVC文件上传08-使用客户端jQuery-File-Upload插件和服务端Backload组件让每个用户有专属文件夹