Ztree 觸發onClick事件

一.思路node

一、利用 getNodeByParam 等方法找到你須要選中的節點
二、利用 selectNode 方法選中節點
三、直接調用 callback.clickspa

二.代碼code

var treeObj = $.fn.zTree.getZTreeObj("divId");
var nodes = treeObj.getNodesByParam("code", "xaList", null);
treeObj.selectNode(nodes[0]);
menuClick(null,"divId",nodes[0]);
相關文章
相關標籤/搜索