var MyClass = new Class({
foo:function(){
var = new Fung({
go:function(this){
this.bar();
}
});
},
bar:function(){
alert('hello world');
}
});
我试图从嵌套类中访问方法。这可能吗?
答案 0 :(得分:3)
var MyClass = new Class({
foo:function(){
var that = this;
var = new Fung({
go:function(){
that.bar();
}
});
},
bar:function(){
alert('hello world');
}
});