克隆一个对象

var obj={

  name:'lilei',

  age:24

};  

var obj= JSON.parse(JSON.stringify(obj1));

原文地址:https://www.cnblogs.com/pengfei25/p/8708171.html