javascript中,在一个类里attache的event事件中,如果调用类的成员变量和方法
var foucs_a = { createNew: function(){ var cls = { id:'', cur:0, _init: function(id) { var over = function(evt) { var _obj = cls;//注意这里,这里是取得父类的对象 _obj.next(); } this.id = id; jQuery("#fff").bind("mouseover", over); }, next: function() { alert(this.cur); this.cur++; } }; return cls; } }; var fa = foucs_a.createNew(); fa._init(); fa.next(); fa.next();