前端-对js原型继承的简单举例

function A(name,color){ this.name=name; this.color=color; } A.prototype.getColor=function(){ return this.color } A.prototype.getName=function(){ retur
posted @ 2019-11-21 14:28  前端张大碗  阅读(221)  评论(0编辑  收藏  举报