87,993
社区成员
发帖
与我相关
我的任务
分享
function a(){
this.name = 'a';
}

function a(){
this.name = 'a';
}
function b(){
this.age = 1;
}
b.prototype = new a();
alert(new b().name);
b.prototype =a.prototype;
alert(new b().name);
alert(new b().age);