ztree取消之前选中状态并设置新的选中
var zTreeObject = $.fn.zTree.getZTreeObj("treeId"); var node = zTreeObject.getNodeByParam('id', nodeId); // 取消之前所有选中 zTreeObject.cancelSelectedNode(); // 设置选中 zTreeObject.selectNode(node, true);
var zTreeObject = $.fn.zTree.getZTreeObj("treeId"); var node = zTreeObject.getNodeByParam('id', nodeId); // 取消之前所有选中 zTreeObject.cancelSelectedNode(); // 设置选中 zTreeObject.selectNode(node, true);