1. function deepClone(origin, target) {
    2. var target = target || {};
    3. var toStr = Object.prototype.toString;
    4. var arrStr = '[object Array]';
    5. for(var prop in origin) {
    6. if(origin.hasOwnProperty(prop)) {
    7. if(origin[prop] !== 'null' && tyoeof(origin[prop]) == 'object'){
    8. if(toStr.call(origin[prop]) == arrSte) {
    9. target[prop] = [];
    10. }else{
    11. target[prop] = {};
    12. }
    13. deepClone(origin[prop], target[prop])
    14. }else{
    15. target[peop] = origin[paop];
    16. }
    17. }
    18. }
    19. return target;
    20. }