Ext.expend()
学习来源: http://wangyu.iteye.com/blog/210849
Ext.extend 是Ext的继承机制,一般有两种用法:
1. C=Ext.extend(S,{s1:"覆盖"});
<script type="text/javascript">
function S(){
}
S.prototype.s="s";
S.prototype.s1="s1";
C=extend(S,{s1:"覆盖"});
var c = new C();
alert(c.s);
alert(c.s1);
</script>
2. Ext.extend(C,S,{s1:"覆盖"});
<script type="text/javascript">
function S(){
}
S.prototype.s = "s";
S.prototype.s1 = "s1";
function C(){
this.c = "c";
this.c1 = "c1";
}
Ext.extend(C,S,{s1:"覆盖"});
var c = new C();
alert(c.s); //s
alert(c.s1); //覆盖
</script>

浙公网安备 33010602011771号