摘要: ####1、原型链继承 直接将子类型的原型指向父类型的实例,即“子类型.prototype = new 父类型();”,实现方法如下: //父类构造函数 function father(name) { this.name = name; this.colors = ['red']; } //父类添加 阅读全文
posted @ 2019-11-15 01:18 TRY0929 阅读(134) 评论(0) 推荐(0) 编辑