摘要: /** * 递归查找目标节点 */ function findTarget(obj,targetId,targetChildren){ if(obj.id==targetId){ obj.children=targetChildren; return true; }else{ if(obj.chil 阅读全文
posted @ 2020-04-16 18:22 Qionghuihe 阅读(2096) 评论(0) 推荐(0) 编辑
摘要: // 遍历解析Jsonfunction parseJson(jsonObj) { // 循环所有键 for(var key in jsonObj) { //如果对象类型为object类型且数组长度大于0 或者 是对象 ,继续递归解析 var element = jsonObj[key]; if(el 阅读全文
posted @ 2020-04-16 18:21 Qionghuihe 阅读(1739) 评论(0) 推荐(0) 编辑
摘要: var defaultData = [{ text: '开发部门', href: '#parent1', tags: ['4'], id:3003, nodes: [ { text: 'Child 1', href: '#child1', tags: ['2'], id:3004, nodes: [ 阅读全文
posted @ 2020-04-16 14:58 Qionghuihe 阅读(2628) 评论(0) 推荐(0) 编辑
摘要: $(document).on("click","#myid,.myclass",function(){ //...... }) 阅读全文
posted @ 2020-04-16 09:57 Qionghuihe 阅读(390) 评论(0) 推荐(0) 编辑
摘要: $('#myModal').modal('hide'); 阅读全文
posted @ 2020-04-16 09:22 Qionghuihe 阅读(721) 评论(0) 推荐(0) 编辑