combotree树

$('#item').combotree({
  valueField: "id", //Value字段
     textField: "text", //Text字段
     multiple: true,
      data: [{ "id": 1, "text": "全选", "children": [{id:'2',text:'a'},{id:'3',text:'b'},{id:'4',text:'c'},{id:'5',text:'e'},{id:'6',text:'f)'},{id:'7',text:'h'},{id:'8',text:'i'}{id:'14',text:'其他'}]}],
 onCheck: function (node, checked) {
                    //让全选不显示
   $("#item").combotree("setText", $("#item").combobox("getText").toString().replace("全选,", ""));
                   }
    });





 selectData.item = $('#item').combotree('getText');


<tr>
<td style="text-align: right; font-weight: bold;">项目:</td>
<td style="text-align: left;">
 <input id="item" class="easyui-combobox" name="item" data-options="valueField:'id',textField:'text'" style="width: 146px;" />   
</td>
</tr>    

 

posted @ 2017-06-17 14:54  码农兜兜  阅读(217)  评论(0编辑  收藏  举报