var len = 5;var fn1 = function () { console.log(this.len); };var main = { method: function (fn) { fn(); arguments[0](); }, len : 10}; main.method(fn1);
迷茫2017-02-22 09:22:25
var fn1 = function () { console.log(this.len); };
直接执行fn1的结果是5 很显然这个函数里面的this指向的是window