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浏览器时,网页是刷新并加载触发?