情况如下:
Ext.onReady(function() {
var test= function(){
alert('extjs ok');
}
}
上诉代码是不能调用 test方法的。因为test是私有的调用不了
代码改为如下,就可以在外边调用了
Ext.onReady(function() {
this.test= function(){
alert('extjs ok');
}
}
转载于:https://blog.51cto.com/3240113/818175