var deepCopy = function(o) { if (o instanceof Array) { var n = []; for (var i = 0; i < o.length; ++i) { n[i] = deepCopy(o[i]); } return n; } else if (o instanceof Object) { var n = {} for (var i in o) { n[i] = deepCopy(o[i]); } return n; } else { return o; } }
$.map([{},{},{}], function (obj) { return $.extend(true, {}, obj);//返回对象的深拷贝 });
技术交流QQ群:15129679