摘要: /** * 递归查找目标节点 */ 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 阅读(2104) 评论(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 阅读(1814) 评论(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 阅读(2708) 评论(0) 推荐(0)
摘要: $(document).on("click","#myid,.myclass",function(){ //...... }) 阅读全文
posted @ 2020-04-16 09:57 Qionghuihe 阅读(401) 评论(0) 推荐(0)
摘要: $('#myModal').modal('hide'); 阅读全文
posted @ 2020-04-16 09:22 Qionghuihe 阅读(725) 评论(0) 推荐(0)