extend:function(tar,source) { //遍历对象 for(var i in source){ tar[i] = source[i]; } return tar; } 转载于:https://www.cnblogs.com/yexiangwang/p/5965720.html