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