From 7610d0a90a49dfbb520e90133aa96433969682ea Mon Sep 17 00:00:00 2001 From: Zou Jian Date: Thu, 5 Jan 2017 17:34:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=BB=E6=AD=A2=E7=99=BB=E5=BD=95=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF=E5=BC=B9=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BaiduPanDownload/Forms/Login.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/BaiduPanDownload/Forms/Login.cs b/BaiduPanDownload/Forms/Login.cs index 67b60d9..47b981b 100644 --- a/BaiduPanDownload/Forms/Login.cs +++ b/BaiduPanDownload/Forms/Login.cs @@ -36,6 +36,8 @@ public Login() private void Login_Load(object sender, EventArgs e) { webBrowser1.Url = new Uri("http://www.139.sh"); + webBrowser1.ScriptErrorsSuppressed = true; + } private void button1_Click(object sender, EventArgs e) @@ -59,7 +61,13 @@ private void button1_Click(object sender, EventArgs e) private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { - + if (webBrowser1.Document != null) + if (webBrowser1.Document.Window != null) + webBrowser1.Document.Window.Error += Window_Error; + } + void Window_Error(object sender, HtmlElementErrorEventArgs e) + { + e.Handled = true; } string GetCookies(string url) {