wpf 为什么wpf webbrowser 生成脚本错误?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22708989/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 11:22:34  来源:igfitidea点击:

Why wpf webbrowser generate script error?

c#javascriptwpfwebbrowser-control

提问by mans

I have a site that I am trying to navigate to using wpf webbrowser. When I navigate to it, I am getting script error, but if I navigate to the same page using IE (11) on the same pc, I am not getting any error.

我有一个网站,我试图使用 wpf webbrowser 导航到该网站。当我导航到它时,我收到脚本错误,但如果我在同一台电脑上使用 IE (11) 导航到同一页面,我没有收到任何错误。

I supressed the script error on web browser, but then some functionality of the web site is not available when I am accessing it from wpf webbrowser.

我在 web 浏览器上抑制了脚本错误,但是当我从 wpf webbrowser 访问它时,网站的某些功能不可用。

My questions is:

我的问题是:

Why wpf webbrowser generate script error, when IE accesses it without any error?

为什么wpf webbrowser 生成脚本错误,IE 访问它时没有任何错误?

Is there any free alternative to webbrowser that I can use which has not this problem?

有没有我可以使用的没有这个问题的网络浏览器的免费替代品?

回答by Floc

The WebBrowser control use an older version of IE.

WebBrowser 控件使用旧版本的 IE。

You need to specify the IE version you want. Take a look at this : http://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version

您需要指定所需的 IE 版本。看看这个:http: //weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version