87,917
社区成员
发帖
与我相关
我的任务
分享
function person(name,age)
{
this.name=name;
this.age=age;
this.showInheritance=function()
{
document.write(this.name+" "+this.age);
}
}
function dog(name,age)
{
this.x=person;
this.x(name.age);
}
var dog1=new dog("bage",3);
dog1.showInheritance();
function dog(name,age) {
this.x=person;
this.x(name, age); //刚才标注错了,你这里有低级错误,逗号写成点号了
}