摘要:
一、屏蔽alert、confirm、showModalDialog源代码: 例1、先引用COM组建mshtml;引用名称空间mshtml:using mshtml;然后处理WebBrowser控件的Navigated事件,代码如下:private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e) { IHTMLWindow2 win = (IHTMLWindow2)webBrowser1.Document.Window.DomWindow; string s = "window.alert = 阅读全文