标签:span cti obj ons string tar code csdn pre
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);
标签:span cti obj ons string tar code csdn pre
原文地址:http://www.cnblogs.com/beimingbingpo/p/6895337.html