|
楼主 |
发表于 2013-10-22 17:04:41
|
显示全部楼层
1 |
e.Cancel = true;
WebBrowser wbWebBrowser = (WebBrowser)sender;
StringBuilder sb = new StringBuilder();
sb.AppendLine("function alert(){return;}");
sb.AppendLine("function confirm(){return;}");
sb.AppendLine("function showModalDialog(){return;}");
sb.AppendLine("function showModelessDialog(){return;}");
sb.AppendLine("function window.open(){return;}");
sb.AppendLine("function prompt(){return;}");
string strJS = sb.ToString();
IHTMLWindow2 win = (IHTMLWindow2)wbWebBrowser.Document.Window.DomWindow;
win.execScript(strJS, "Javascript");
win = null;
我屏蔽了很多,也没屏蔽完。 |
|
|