function deepClone(data){
  if(!data || !(data instanceof Object) || (typeof data=="function"))
  {
    return data||undefined;
  }
  var constructor = data.constructor;
  var result = new constructor();
  for(var key in data){
    if(data.hasOwnProperty(key)){
      result[key]=deepClone(data[key]);
    }
  }
  return result;
}

相关文章:

  • 2022-12-23
  • 2021-04-10
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2021-07-19
猜你喜欢
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案