var o = function () { this.a = 12; }; console.log(o.a);//為什么是undefined? function f() { this.a = 12;}var o2 = new f();console.log(o2.a);//為什么是12?
javascript this問題
繁花不似錦
2018-09-07 13:12:33