var name = "The Window"; var object = { name : "My Object", getNameFunc : function(){ return function(){ return this.name; }; } }; alert(object.getNameFunc()());如上,為什么打印The Window,和閉包聯(lián)合一起講下
老生常談,閉包和this問題
慕運(yùn)維8079593
2019-03-23 18:15:54