1. 確保本身的easyui版本在1.4.5以上javascript
若是不是,找個版本高的,替換java
這兩個文件。node
2. 使用ui
onLoadSuccess: function (node, data) { $('#tree').combotree('setValue', 109); // 109是id值,數字類型 }
3.完整代碼url
<input class="easyui-combotree" name="deptId" width="90%" panelHeight="auto" id="userEditFormTree"
data-options="valueField:'deptId', textField:'deptName',url:'dept/deptList',required:true,
editable:false,
onLoadSuccess: function (node, data) { var did = parseInt($('input[name=did]').val()); $('#userEditFormTree').combotree('setValue', did); }
"/>