this的相關知識

this執行主體:誰把它執行的函數 第一種:函數執行,看前面是否有"點",有,「點」前面是誰this就是誰;沒有,this是window(嚴格模式下是undefined),自執行函數中的this通常都是window。this fn() this: window事件 obj.fn()  this: objio obj.__proto__.fn()  this: obj.__proto__functi
相關文章
相關標籤/搜索