2020年3月25日

JavaScript继承方式

摘要: 一、原型链继承 子类型的原型为父类型的一个实例对象。 // 父类型 function Parent(name, age) { this.name = name; this.age = age; this.showName = function() { console.log('parentName' 阅读全文

posted @ 2020-03-25 00:19 何忱 阅读(275) 评论(0) 推荐(0)

导航