this是当前行为的执行主体。 this与函数在哪定义、在哪执行都不要紧。
有".",this就是"."前面的; 没有".",this就是window。
function fn() { console.log(this) } var obj = { fn: fn } fn(); //this => window obj.fn(); //this => obj