http://blog.csdn.net/liyujia6636/article/details/52198128
方法二:
将对象序列化再解析回来,对象中如果有函数function则不能正确复制
var obj = {a:1,b:2} var newObj = JSON.parse(JSON.stringify(obj)); newObj.a=3; console.log(obj); console.log(newObj);