HTML+CSS+JS dTree 树形目录的使用

example 压缩包:https://pan.baidu.com/s/1DI2mM3iSnKtpkV45-gUzAA 提取码: m1pi

使用注意事项:

1)dtree.js里可以修改点击项目的操作

原js文件里的nodeSel和node的样式切换不生效,可以在点击方法里添加

var cur_sel_id = -1;
function setDetail(api_id, name){
    console.log(api_id);
    if(cur_sel_id >= 0){
        var old = document.getElementById("sd"+ cur_sel_id);
        old.className = "node";
    }
    eNew = document.getElementById("sd"+ api_id);
    eNew.className = "nodeSel";
    …………
}

也可在dTree官网查看学习dTree api使用

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注