一、設置屬性javascript
<input id="cc" class="easyui-combotree" data-options="url:'tree_data2.json', valueField: 'valueid',textField: 'text',method:'get',label:'Select Node:',labelPosition:'top'" style="width:100%">java
注意:json結構中增長valueid列,也能夠本身定義一個列名;combotree自己不支持valueField的自定義。json
二、獲取值的方法ui
function getCombValue(el, value) { var arr = [], checked = el.combotree('tree').tree('getSelected'); $.each(checked,function(j,o){ if (j == value){ arr.push(o); return false; } }); return arr; }
三、如何使用:url
使用方法爲:getCombValue($("#cc"), "valueid");blog
四、經過自定義的值進行綁定ip
抱歉:未完成,有空再寫。get