标签:
//JS的面向对象编程
在这里,原型对象就是类,JS中一切都是类
person1[Key];
}
function Person(){
this.name = "hzm";
this.age = 24;
this.speak = function (){
alert(this.name + this.age);
};
}
function Chinese(){
this.person = Person;
//继承关键
this.person();
//覆盖父类的speak函数
this.speak = function(){
alert("Chinese");
};
}
标签:
原文地址:http://www.cnblogs.com/hzmbbbb/p/4279753.html