C#设置WebBrowser IE浏览器版本

摘要:
DOCTYPEDIrectives显示在IE9模式10000(0x2710):InternetExplorer10.网页包含基于标准的!DOCTYPEDIrectives显示在IE9模式中。10001(0x2AF7):InternetExplorer10。网页显示在IE10标准模式中,不考虑!DOCTYPEdirective.9999(0x270F):InternetExplorer9.网页显示在IE9标准模式中,不管!DOCTYPE修正版9000(0x2328):InternetExplorer9.网页包含基于标准的!DOCTYPE修正以IE9模式显示。8888(0x22B8):网页显示在IE8Standardsmode中,不管!DOCTYPEdirective.8000(0x1F40):网页包含基于标准的!

1)假设你应用程序的名字为MyApplication.exe

2)运行Regedit,打开注册表,找到

对于32位程序:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION

对于64位程序:
HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION

3)添加以下项

C#设置WebBrowser IE浏览器版本第1张

IE各版本的值如下:

  • 11001 (0x2EDF) Internet Explorer 11. Webpages are displayed in IE11 Standards mode, regardless of the !DOCTYPE directive

  • 11000 (0x2AF8) :Internet Explorer 11. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode

  • 10000 (0x2710) :Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode.

  • 10001 (0x2AF7) :Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive.

  • 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.

转自:https://www.cnblogs.com/youlechang123/p/6339306.html

免责声明:文章转载自《C#设置WebBrowser IE浏览器版本》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇mysql explain用法和结果的含义jQuery操作input值总结下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Microsoft Web Test Recorder在录制时没有显示

在进行web test录制时,IE启动后,在左侧可能没有显示Microsoft Web Test Recorder,这很有可能是因为IE加载项中,该项被禁止了,按照如下操作可解决此问题: 1. 打开IE的 管理加载项 窗口,如下图 2. 选择 工具栏和扩展,正常在右侧的列表中可以看到Microsoft Web Test Recorder ... 3. 选...

vue项目加载前空白的动画过渡效果

参考:https://github.com/mgbq/nx-admin 复制以下html内容到项目的index.html中即可: <style> html, body, #app { height: 100%; margin: 0px; padding: 0px; }...

IE中自定义标签使用自封闭格式引发错误!

最近学习IONIC,其中用到了ion-menu-nav-button,由于标签开始和结尾之间没有内容,所以图省事儿使用自封闭标签的写法: <ion-menu-nav-button class="button-icon icon ion-navicon" ng-click="tgMenu();" /> 在chrome和firefox下都没有问题,...

windows命令绕过

windows命令绕过 forfies 使用方式如下: 实际使用: forfiles /c c:windowssystem32calc.exe 确认任务的父进程为forfiles.exe pcalua 实际使用: pcalua.exe -a c:windowssystem32calc.exe 主进程就是运行的进程 SyncAppvPu...

禁用IE打开FLASH文件的安全提示

每次通过IE打开Flash的Swf文件都会弹出一个信息栏的提示,需要点一下,并点击弹出窗口中的允许方可正常浏览文件,郁闷之极,浪费时间啊,于是网上so了一下,哈哈,不错,一下就找到了。解决了,觉得该办法不错,于是收藏之。。希望对大家也有所帮助。。呵呵。        用IE浏览器打开SWF文件时,会弹出一个“为帮助保护你的安全……”的警告框,选择“允许.....

浏览器版本低于IE10跳转到指定网页

var userAgent = navigator.userAgent; var ie6 = (/msies*(d+).d+/g.exec(userAgent.toLowerCase()) || [0, "0"])[1] == "6", ie7 = userAgent.indexOf('MSIE 7.0') > -1, ie8 = u...