2011-12-14 19 views
4

我正在嘗試使用IE 8開發人員工具調試某些問題。Javascript:「源代碼不適用於此位置」msg同時使用IE調試

但是運行下面的代碼後,調試器會拋出錯誤「無法用於此位置源代碼」

window.onload = function() { 
    tabberAutomatic(tabberArgs); 
}; 

是什麼意思?

上面的代碼是下面的代碼部分,其基本運行功能tabberAutomatic一旦文檔加載完成:

/* This function adds tabberAutomatic to the window.onload event, 
    so it will run after the document has finished loading. 
    */ 
    var oldOnLoad; 

    if (!tabberArgs) { tabberArgs = {}; } 

    /* Taken from: http://simon.incutio.com/archive/2004/05/26/addLoadEvent */ 

    oldOnLoad = window.onload; 
    if (typeof window.onload != 'function') { 
    window.onload = function() { 
     tabberAutomatic(tabberArgs); 
    }; 
    } else { 
    window.onload = function() { 
     oldOnLoad(); 
     tabberAutomatic(tabberArgs); 
    }; 
    } 

我試圖調試問題在我剛纔的問題解釋browser showing progress bar as still progressing even when the page is loaded

感謝輸入!

+0

@mgraph:正如我剛纔所說,我剛纔提到的錯誤出現的行執行後。即在分號之後。 – Nik 2011-12-14 10:48:26

回答

相關問題