function c()
{
this.p=1;
this.c2=function ()
{
var _method = this;
return function()
{
return function (){alert(this.p);}.apply(_method);
};
}
}
(new c().c2())();可以了,apply是执行一个函数,不是返回一个函数,所以还要再return
{
this.p=1;
this.c2=function ()
{
var _method = this;
return function()
{
return function (){alert(this.p);}.apply(_method);
};
}
}
(new c().c2())();可以了,apply是执行一个函数,不是返回一个函数,所以还要再return
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货