开发者

javascript class props

I have a class defined like thi开发者_开发知识库s (scheme) :

myClass = BaseClass.extend({
    method1 : function(){ ...},
    method2 : function(){ ...}
});

How can I call method2 from method1? something like:

myClass = BaseClass.extend({
    method1 : function(){ method2(); },
    method2 : function(){ ...}
});


you need scope:

this.method2();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜