javascript 承继的实现

javascript 继承的实现1.类抄写function parent(){this.x10}function child(){var retnew parent()ret

javascript 继承的实现

1.类抄写

function parent(){    this.x=10;}function child(){    var ret=new parent();    ret.y=20;    return ret;}var childObj=new child();alert(childObj.x);

??