摘要: 本文讲解JavaScript各种继承方式和优缺点。 一、原型链继承 function Parent () { this.name = 'kevin'; } Parent.prototype.getName = function () { console.log(this.name); } funct 阅读全文
posted @ 2020-04-12 09:19 盼星星盼太阳 阅读(286) 评论(0) 推荐(0) 编辑