面向对象(继承)--寄生组合式继承06

还记得组合继承吗,回忆一下 function SuperType(name) { this.name = name; this.colors = ["red", "blue", "green"]; } SuperType.prototype.sayName = function () { alert(this.name); }; function SubType(name,
相关文章
相关标签/搜索