function?A(){
????this.x?=?"我想要取到這個x";
}
A.prototype.b?=?(function()?{
????c?=?function?()?{
????????alert(this.x);?//?這里的this.x如何指向實例中的x了?
????}
????
????return?{
????????c?:?c,
????}
})();
var?obj?=?new?A();
obj.b.c();
原型上的對象里的方法如何指向實例了?
路北
2016-04-08 21:04:52