void browser_Navigated(object sender, System.Windows.Forms.WebBrowserNavigatedEventArgs e)
{
// 屏蔽alert
mshtml.IHTMLWindow2 win = (mshtml.IHTMLWindow2)browser.Document.Window.DomWindow;
win.execScript(@"function alert() {}", @"javascript");
}
注入式的话需要将JS代码存如到对方数据库中,还得需要对方的网页没有做相应的防护...
已解决. var doc = browser.Document;