function Animal(){ this.species = "动物";
} function Cat(name,color){ this.name = name; this.color = color;
}
Cat.prototype = new Animal();
Cat.prototype.constructor = Cat; var cat1 = new Cat("大毛","黄色"); console.log(cat1.species)![图片描述][1]
2 回答
- 2 回答
- 0 关注
- 500 浏览
添加回答
举报
0/150
提交
取消