1 2 3 4 5 6jQuery 扩展 extend 回顾 7 8 9 10 11 12
1 var a = $.extend(false,{b:'c'},{a:{name:'john'},c:'f'}); 2 3 console.log(a); 4 5 var a = { }; 6 var b = { c:{age:30,name:'john'},d:'4' }; 7 8 var c = $.extend(true,a,b); 9 a.c.age=50;10 a.d=3;11 console.log(a.c.age);12 13 console.log(c);