1. 程式人生 > >easyUI中tree的預設載入子節點

easyUI中tree的預設載入子節點

$(document).ready(function() {     $('#comboboxtree').tree({

 /* 傳送請求*/         url : 'comboboxtree?',         onLoadSuccess : function(node,data) {             var rootNode = $(this).tree('getRoot');             var children = $(this).tree('getChildren', rootNode.target);             /* 選中第一個子節點 */             $(this).tree("select", children[0].target);

 /* 自己寫的傳參獲取資料顯示方法 */             showItemCode(children[0].id);         }     }); });