implement inheritance by object masquerading
<script language="javascript" type="text/javascript">
function clsA(){
this.color="red";
this.sayColor=function(){
alert(this.color);
}
this.sayColorAgain=function(){
alert(this.color);
}
}
function clsB(){
this.color="green";
//this.prox=clsA;
//this.prox();
//delete this.prox;
//clsA.call(this);
clsA.apply(this);
}
var clsb=new clsB();
clsb.sayColor();
clsb.sayColorAgain();
</
生产内容,同时打通搜索引擎(SEO)与AI搜索引擎(GEO)流量入口的软件! 点击进入365建站器 »
