function Test(){
Test.prototype.aa = functon(obj){ .... }; Test.prototype.bbb = function(obj){
obj.animate(
{"marginLeft":+Hsize+"px"},
this.speed,
function(){
this.aaa(obj); /*这里要如何处理才能调用 aa 方法?? 目前这样写是错误的。*/
}
); }
}
Test.prototype.aa = functon(obj){ .... }; Test.prototype.bbb = function(obj){
obj.animate(
{"marginLeft":+Hsize+"px"},
this.speed,
function(){
this.aaa(obj); /*这里要如何处理才能调用 aa 方法?? 目前这样写是错误的。*/
}
); }
}
function Test(){
Test.prototype.aa = function(obj) { alert("ss"); };
Test.prototype.bbb = function(obj) {
(function() {
this.aa(obj);
}).call(this);
}
}
var t = new Test();
t.bbb("s");
fu();
};
function Test(){
Test.prototype.a = function(obj1){alert(obj1)};
Test.prototype.b = function(obj2){
obj2.show(
(function(o){
return function() {
o.a(obj2);
}
})(this)
);
}
}
2.String.prototype.show = function(fu){
fu();
};
function Test(){
var _this = this;
Test.prototype.a = function(obj1){alert(obj1)};
Test.prototype.b = function(obj2){
obj2.show(
function(){
_this.a(obj2);
}
);
}
}