0
當我通過setTimeout執行myCallback時。在myCallback中如何評估this
?這是如何評估一個函數作爲回調執行?
setTimeout(myCallback, 1000);
// is 'this' inside myCallback going to be the same as
// if I invoked myCallback directly like this: myCallback() ?
您是否嘗試過全球「窗口」對象執行它? =) –
[該「關鍵字如何工作?」可能是重複的](http://stackoverflow.com/questions/3127429/how-does-the-this-keyword-work) –