function c1(){this.name="1"}
function c2(){this.name="2";c1.call(this);}
alert(new c2().name);
function c2(){c1.call(this);this.name="2";}
alert(new c2().name);
javascript 继承
最新推荐文章于 2022-11-28 15:23:58 发布
function c1(){this.name="1"}
function c2(){this.name="2";c1.call(this);}
alert(new c2().name);
function c2(){c1.call(this);this.name="2";}
alert(new c2().name);