/**
*深度复制对象
*/
(function(){
var clone=function(obj){
var newO={};
if(obj instanceof Array){
newO=[];
}
for(var key in obj){
var val=obj[key];
newO[key]=typeof val==="object":arguments.callee(val)?val;
}
return newO;
};
})();
/**
*深度复制对象
*/
(function(){
var clone=function(obj){
var newO={};
if(obj instanceof Array){
newO=[];
}
for(var key in obj){
var val=obj[key];
newO[key]=typeof val==="object":arguments.callee(val)?val;
}
return newO;
};
})();