110,534
社区成员
发帖
与我相关
我的任务
分享
void wb_NavigateComplete2(object pDisp, ref object URL)
{
mshtml.IHTMLDocument2 doc = (wb.ActiveXInstance as SHDocVw.WebBrowser).Document as mshtml.IHTMLDocument2;
doc.parentWindow.execScript("window.alert=null", "javascript");
doc.parentWindow.execScript("window.confirm=null", "javascript");
doc.parentWindow.execScript("window.open=null", "javascript");
doc.parentWindow.execScript("window.showModalDialog=null", "javascript");
doc.parentWindow.execScript("window.close=null", "javascript");}
Form frm=new Form();
e.ppDisp=frm.axWebBrowser1.Application;
frm.Show();
这样依然无法拦截弹出窗口呀?请帮忙指点