日期:2014-05-16 浏览次数:20394 次
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); //刚才标注错了,你这里有低级错误,逗号写成点号了 }