//判断对象的类型 Array Object Function String Number ..... function getObjType(obj){ return Object.prototype.toString.call(obj).slice(8,-1);} //拷贝对象 function deepClone(obj){ var type = getObjType(obj), //获取类型 temp = obj; if(typeof obj === 'object'){ if(type