标签:
//对象深拷贝 var deepCopy= function(source) { var result={}; for (var key in source) { result[key] = typeof source[key]===‘object‘? deepCopy(source[key]): source[key]; } return result; } var newobj = deepCopy(obj); console.log(newobj);
标签:
原文地址:http://www.cnblogs.com/lydialee/p/4657307.html