easyui combotree不让父级选中
2024-08-22 10:07:15
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
最新文章
- LINK1123:failure during conversion to COFF:file invalid or corrupt
- python语言的优点和缺点
- paip.语义分析--单字词形容词表180个
- Creating, Stopping, Re-Starting and Deleting a Timer in Oracle Forms
- IT公司100题-9-判断整数序列是不是二元查找树的后序遍历结果
- 深入理解Linux内核-第七章 进程调度
- dbutils 执行sql返回的数据类型
- linux进程与端口查看命令
- JSP标准标签库(JSTL)--SQL标签库 sql
- centos 7 配置 到多站点设置
- IntelliJ IDEA 报错:找不到包或者找不到符号
- [Swift]LeetCode400. 第N个数字 | Nth Digit
- 基于C#.NET的高端智能化网络爬虫(二)(攻破携程网)
- Java 基本数据类型 &;&; 位运算
- ASIHTTPRequest缓存策略download cache
- Minimax-486. Predict the Winner
- git pull 总要求输入账号和密码解决?
- centos killall安装
- MySql C++调用库Connector/c++编译 和 接口封装【三】Connector/c++ 使用总结及封装
- UVA-10615 Rooks (二分图匹配)
热门文章
- Codedforces 1076G Array Game 线段树
- [CodeForces-585F]Digits of Number Pi
- 【openjudge】 CDQZ challenge 4
- BZOJ 1208: [HNOI2004]宠物收养所 SET的妙用
- BZOJ 1012: [JSOI2008]最大数maxnumber 单调队列/线段树/树状数组/乱搞
- Linux的本地时间和网络时间同步
- 一个.net下的轻量级的Serverless 文档数据库LiteDB
- Android peferenceActivity 自己定义标题简单方法
- WINDOWS WPA性能分析
- MVC文件上传08-使用客户端jQuery-File-Upload插件和服务端Backload组件让每个用户有专属文件夹