摘要: jQuery中有$.extend(obj1,obj2)函数实现将obj2中的属性复制到obj1中,想了一下,javascript原生写法应该是这样:for ( name in obj2 ) { obj1[name] = obj2[name];} 阅读全文