function Person(name,age,sex){ this.name = name; this.age = age; this.sex = sex; }
function P1(name,age,sex,grade){ Person.call(this,name,age,sex); this.grade = grade; }
var p = new P1('zhangsan',20,'nan','jim');
缺点:
每一次继承都要调用两个函数
而且不能继承Person的原型内的属性和方法