二、框架封装的三种模式 1原型模式(prototype),需要实例化;2,自面量(json)方式;3合并(extend)

extend:function(tar,source) {
    //遍历对象
    for(var i in source){
        tar[i] = source[i];
    }
    return tar;
}

 

posted @ 2016-10-16 00:10  XINYUHAI77  阅读(203)  评论(0编辑  收藏  举报