1
我已經實現BHO插件來檢測使用C#的網頁上的NUMBER。每次頁面加載在網頁中追加JavaScript,並檢測到javascript檢測數字,並用超鏈接數字代替它。BHO插件不能正常工作
代碼
public void WebBrowser_DownloadComplete()
{
HTMLDocument document = (HTMLDocument)webBrowser.Document;
IHTMLElement head = (IHTMLElement)((IHTMLElementCollection)
document.all.tags("head")).item(null, 0);
IHTMLScriptElement scriptObject =
(IHTMLScriptElement)document.createElement("script");
scriptObject.type = @"text/javascript";
scriptObject.src = @"myscript.js";
((HTMLHeadElement)head).appendChild((IHTMLDOMNode)scriptObject);
}
問題
當我與離線網頁,它正在精測插件。但在線頁面不起作用。 DownloadComplete事件會多次觸發。
問題
哪個事件是由IE瀏覽器時,網頁是刷新並加載觸發?