superclass.constructor.call(this,config),参数有关问题
superclass.constructor.call(this,config),参数问题JScript codefunction Base(config){this.nameconfig
superclass.constructor.call(this,config),参数问题
JScript codefunction Base(config){ this.name=config.name; this.age=config.age; this.password=config.password; } function base(config){ this.a=config.a; this.b=config.b; this.c=config.c; base.superclass.constructor.call(this,config);//第一个参数this是什么意思?不太明白 } Ext.extend(base,Base,{ showMessage:function(){ window.alert("name="+this.name+" a="+this.a); } });
大哥大姐们,说明一下
[解决办法][解决办法]改变作用域,参考
JavaScript变量函数预编译与执行顺序的关系
[解决办法][解决办法]