$.fn.zTree.init($("#tree-div"), setting, zNodes);
$("#tree-div").parent().parent().parent().css("overflow-x","hidden");
var ids = $("#ids").val();
if(ids.trim()!=""){
var tree = $.fn.zTree.getZTreeObj("tree-div");
var strs = ids.split(",");
for(var j=0;j<strs.length;j++){
var node = tree.getNodeByParam("id",strs[j]);
var parent = node.getParentNode();
if(!parent.open){
tree.expandNode(parent,true,true);
}
tree.checkNode(node , true,true);
}
}
ztree 选中,展开指定节点
最新推荐文章于 2022-05-12 15:12:25 发布