<script>
function Clone(obj){
for (var key in obj )
{
this[key]=(typeof obj[key]="object")?new Clone(obj[key]):obj[key];
};
};
function Person(name,age,marry,sex){
this.name=name;
this.age=age;
this.marry=marry;
this.sex=sex;
};
Person.prototype.showName=function(){
alert(this.name);
};
function PersonChild(pArr,weight){
Person.apply(pArr,this);
this weight=weight;
};
PersonChild.prototype=new Clone(Person.prototype);
PersonChild.prototype.showAge=function(){
alert (this.age);
};
alert(Person.prototype.showAge);
</script>
this[key]=(typeof obj[key]="object")?new Clone(obj[key]):obj[key];
这串代码,左边无效是为什么
