ducky_L

导航

js 实现继承

一、使用原型链 function Animal1(leg){ this.leg=leg; } function Dog1(name){ this.name=name; Animal1.call(this,4) //!!import1 } Dog1.prototype.__proto__=Animal

posted on 2023-04-24 17:59  ducky_L  阅读(2)  评论(0编辑  收藏  举报