【C#WebBrowser 提示JS脚本错误】
2014-12-02 10:06
337 查看
问题:在IE浏览器可以正常显示的网页,用WebBrowser打开,弹出 脚本错误窗口。
问题分析:WebBrowser用的虽然是IE内核,但是WebBrowser默认的IE版本(好像是IE7)和计算机当前的IE浏览器的版本不相同。
解决办法1:修改注册表,
Win7 32位,注册表位置: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
添加新项 "process.exe",(比如我的程序名是:process.exe), 右键,修改值, 选择“十进制” ,赋值 “9999”;
Win7 64位,注册表位置 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet
Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
添加新项 "process.exe",(比如我的程序名是:process.exe), 右键,修改值, 选择“十进制” ,赋值 “9999”;
【注】:关于赋值“9999”, 英文原版(只看的懂IE9,所以试了一个9999,然后我的问题解决了):
9999 (0x270F)
Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.
9000 (0x2328)
Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode.
8888 (0x22B8)
Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.
8000 (0x1F40)
Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode.
7000 (0x1B58)
Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode.
问题分析:WebBrowser用的虽然是IE内核,但是WebBrowser默认的IE版本(好像是IE7)和计算机当前的IE浏览器的版本不相同。
解决办法1:修改注册表,
Win7 32位,注册表位置: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
添加新项 "process.exe",(比如我的程序名是:process.exe), 右键,修改值, 选择“十进制” ,赋值 “9999”;
Win7 64位,注册表位置 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet
Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
添加新项 "process.exe",(比如我的程序名是:process.exe), 右键,修改值, 选择“十进制” ,赋值 “9999”;
【注】:关于赋值“9999”, 英文原版(只看的懂IE9,所以试了一个9999,然后我的问题解决了):
9999 (0x270F)
Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.
9000 (0x2328)
Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode.
8888 (0x22B8)
Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.
8000 (0x1F40)
Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode.
7000 (0x1B58)
Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode.
相关文章推荐
- C# webBrowser 屏蔽网页JS脚本错误弹窗
- C# WebBrowser中屏蔽弹出窗口及脚本错误提示
- 黄聪:C#禁止Webbrowser中的脚本错误提示,自动屏蔽弹出窗口
- 黄聪:C#禁止Webbrowser中的脚本错误提示,自动屏蔽弹出窗口
- C# Webbrowser截屏 禁止弹出窗口及脚本错误提示 截取flash 视频
- C# Webbrowser中屏蔽弹出窗口及脚本错误提示
- C# Webbrowser截屏 禁止弹出窗口及脚本错误提示 截取flash 视频
- c# webbrowser 禁用js->沉默方式阻止js错误
- 使 WebBrowser 更简单的新加和执行 js, 可安装 jQuery 脚本的 C# 开源代码 - IEBrowse...
- 使 WebBrowser 更简单的新加和执行 js, 可安装 jQuery 脚本的 C# 开源代码 - IEBrowser [1]
- 当用webBrowser1加载网页的时候,网页中出现js错误,会弹出一个提示,如何屏蔽不提示
- VB.NET让webbrowser控件中JS脚本错误最新方法(2013-09-16)
- 屏蔽JS脚本错误提示(JS容错代码)
- C#Webbrowser中屏蔽弹出窗口及脚本错误提示
- [转]当用webBrowser1加载网页的时候,网页中出现js错误,会弹出一个提示,如何屏蔽不提示?
- WPF - WebBrowser 抑制js错误提示框
- C#Webbrowser中屏蔽弹出窗口及脚本错误提示
- js脚本获取信息并提示错误
- C# webbrowser中新窗口在Webbrowser内打开屏蔽网页JS错误
- 使 WebBrowser 更简单的新加和执行 js, 可安装 jQuery 脚本的 C# 开源代码 - IEBrowse...