1、扩展原型对象实现继承
2、利用apply()和call实现继承
3、组合call+prototype实现继承
function person(name){
this.name=name;
}
function.prototype.showName=funciton(){
return this.name;
}
funciton man(name,age){
person.call(this.name);
this.age=age;
}
man.prototype=new person();
man.prototype.showAge=funciton(){
return this.age;
}
var Man=new man ('woshi',12)
man.showName();//woshi
man.showAge();//12