原文链接:https://blog.csdn.net/www1056481167/article/details/80241710
function showOrHidden(){
var value=$("#checkbox").attr("value");
var zTree = $.fn.zTree.getZTreeObj("tree-obj");
if(value=='0'){
zTree.expandAll(true);
$("#checkbox").attr("value","1");
}else{
zTree.expandAll(false);
$("#checkbox").attr("value","0");
}
}
标签:expandAll,checkbox,attr,折叠,ztree,zTree,value,var,节点 From: https://www.cnblogs.com/Dongmy/p/17676883.html