function Person(){}
function Student(){}
Student.protope = new Person();//1、使用构造函数的方式,这要根据构造函数相应改变
Student.prototype = Object.create(Person.prototype);//2、使用object.create方式
子类调用父类的方法:
fucntion Person(name){
this.name = name;
}
function Student(name,className){
this.className = className;
Person.call(this,name);
}