EasyUI combotree
来源:互联网 发布:公告管理系统源码 编辑:程序博客网 时间:2024/06/05 10:08
1.引入css和js
2.加入标签
注:id,用于js操作;name,用于获取值
3.加入js代码
4.JSON格式
- <link rel="stylesheet" type="text/css" href="themes/default/easyui.css">
- <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
- <script type="text/javascript" src="js/jquery.easyui.min.js"></script>
2.加入标签
- <input id="ddtree" name="ddtree" />
注:id,用于js操作;name,用于获取值
3.加入js代码
- $('#ddtree').combotree( {
- //获取数据URL
- url : 'Data',
- //选择树节点触发事件
- onSelect : function(node) {
- //返回树对象
- var tree = $(this).tree;
- //选中的节点是否为叶子节点,如果不是叶子节点,清除选中
- var isLeaf = tree('isLeaf', node.target);
- if (!isLeaf) {
- //清除选中
- $('#ddtree').combotree('clear');
- }
- }
- });
4.JSON格式
- [ {
- "id" : 1,
- "text" : "Folder1",
- "iconCls" : "icon-ok",
- "children" : [ {
- "id" : 2,
- "text" : "File1",
- "checked" : true
- }, {
- "id" : 3,
- "text" : "Folder2",
- "state" : "open",
- "children" : [ {
- "id" : 4,
- "text" : "File3",
- "attributes" : {
- "p1" : "value1",
- "p2" : "value2"
- },
- "checked" : true,
- "iconCls" : "icon-reload"
- }, {
- "id" : 8,
- "text" : "Async Folder",
- "state" : "closed"
- } ]
- } ]
- }, {
- "text" : "Languages",
- "state" : "closed",
- "children" : [ {
- "id" : "j1",
- "text" : "Java"
- }, {
- "id" : "j2",
- "text" : "C#"
- } ]
- } ]
- easyUI ComboTree
- EasyUI combotree
- Easyui combotree
- JQuery EasyUI combotree
- easyui combotree --异步加载
- jquery easyUI ComboTree使用方法
- easyui combotree树
- easyui combotree 和 treegrid
- jQuery easyui combotree
- EasyUI combotree 赋值
- easyUI comboTree的实现
- EasyUi combotree 使用总结
- easyui combotree选项重复
- jquery easyui combotree
- easyui-combotree出现undefined
- easyui combotree基本使用
- easyui的combobox、combotree
- easyui combotree 高度修改
- Linux 下zip包的压缩与解压
- 一些简单的批处理脚本记录
- 【Android学习专题】控件组件篇:Dialog汇总
- Spring加载一些配置文件中不存在的bean,如DB2,SYBASE,Derby,H2等等,Error while extracting database product name
- 在两种不同的颜色中间,按阶数进行过渡
- EasyUI combotree
- JavaCript 定义 JSON数组
- C++著名程序库的比较和学习经验
- 获取项目根目录
- 解决socket.error: [Errno 98] Address already in use问题
- Java程序员从笨鸟到菜鸟之(一百零五)java操作office和pdf文件(三)利用jxl实现数据导出excel报表以及与POI的区别
- linux 根据端口号查找对应进程的ID,操作进程
- 初用Google SVN个人心得
- 双十一的成功未必是好事