easyui table的onLoadSuccess: function(data),data是后台返回的json字符串

onLoadSuccess: function(data) {
$("#suppliercount").html(data.total);
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Combotree 是 easyui 的一个组件,它可以同时显示树形结构和下拉框,可以方便地选择树形结构的节点。下面是 combotree 的使用记录: 1. 引入 easyui 的 css 和 js 文件: ```html <link rel="stylesheet" type="text/css" href="https://cdn.bootcdn.net/ajax/libs/jquery-easyui/1.9.14/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="https://cdn.bootcdn.net/ajax/libs/jquery-easyui/1.9.14/themes/icon.css"> <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery-easyui/1.9.14/jquery.easyui.min.js"></script> ``` 2. 在 HTML 添加 combotree 组件: ```html <input id="tree" class="easyui-combotree" style="width:200px;"> ``` 3. 初始化 combotree 组件: ```javascript $('#tree').combotree({ url: 'tree_data.json', // 树形结构数据的 URL method: 'get', // 数据请求方式 required: true, // 是否必填 panelHeight: 'auto', // 下拉框高度 multiple: true, // 是否允许多选 checkbox: true, // 是否显示复选框 onlyLeafCheck: true, // 是否只允许选择叶子节点 onLoadSuccess: function(node, data) { // 数据加载完成后的回调函数 console.log('load tree data success.'); } }); ``` 4. tree_data.json 文件内容如下: ```json [{ "id": 1, "text": "Node 1", "children": [{ "id": 11, "text": "Node 1.1" },{ "id": 12, "text": "Node 1.2" }] },{ "id": 2, "text": "Node 2", "children": [{ "id": 21, "text": "Node 2.1" },{ "id": 22, "text": "Node 2.2", "children": [{ "id": 221, "text": "Node 2.2.1" },{ "id": 222, "text": "Node 2.2.2" }] }] }] ``` 5. 运行代码后,会显示一个下拉框,点击下拉框会显示树形结构。可以选择节点,也可以多选。 以上就是 combotree 的使用记录,希望对你有帮助。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值