允许JavaScript在Windows窗体的web浏览器上运行 [英] Allowing javascript to run on a windows form web browser

查看:420
本文介绍了允许JavaScript在Windows窗体的web浏览器上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用一个Web浏览器来访问负载使用JavaScript网站。据我所知,Web浏览器是IE浏览器的当前安装的版本的包装。然而,测试在Internet Explorer的网站产生任何错误,但如果我用Web浏览器来访问内容不工作。

I want to use a Web Browser to access a website that uses JavaScript on load. I understand that Web Browser is a wrapper of the current installed version of Internet Explorer. However, testing the website on Internet Explorer yields no errors but does not work if I use the Web Browser to access the content.

我也看着我的Internet安全设置,以确保它已启用。

I have also looked at my internet security settings to ensure it is enabled.

我得到的问题是

推荐答案

笨拙的是,我找到了答案时刻发布此之后,但我想任何人谁在同样的问题之际,我将在这个答案找到慰藉;

Awkwardly enough, I found the answer moments after posting this but I thought anyone who comes across the same problem as me will find solace in this answer;

看来下载最新版本的Internet Explorer是不够的,你必须明确指定IE的版本加入了新的注册表项,以使用

It seems downloading the latest version of Internet Explorer is not enough and you must explicitly specify the version of IE to use by adding a new registry key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION 的64位或32位的机器只

Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION for 64-bit or 32-bit only machines.

或到的 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION 的对在64位系统的32位(它不能伤害,如果你有他们的键添加到两个位置。如果你没有这些,你可以让自己的文件夹)。

Or go to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION for 32-bit on 64-bit systems (It cannot hurt to add keys to both locations if you have them. If you do not have them, you can make the folders yourself).

创建它的应用程序的名称例如一个新的DWORD键,名称MyApp.exe将,然后编辑该键的值。还有,你可以根据你想模仿IE的版本增加了许多不同的值。我进入11001(作为十进制值 - 0x2AF9十六进制)看齐位于IE 11(更多的价值:的 http://msdn.microsoft.com/en-us/library/ee330730%28v=vs.85%29.aspx#browser_emulation )。

Create a new DWORD key and name it the name of your application e.g. "myapp.exe" and then edit the value of the key. There are many different values you can add depending on the IE version you want to emulate. I entered 11001 (as a decimal value - 0x2AF9 in HEX) which emulates IE 11 (many more values located at: http://msdn.microsoft.com/en-us/library/ee330730%28v=vs.85%29.aspx#browser_emulation).

如果你正在使用Visual Studio像我,你会发现,这种方法甚至可能没有正常工作。然而,它的工作。您需要使用资源管理器或终端,而不是运行在Visual Studio中的项目手动打开.exe文件。

If you're using Visual Studio like I am, you'll notice that this method might not even work. However, it does work. You need to manually open the .exe file using Explorer or terminal rather than run the project on Visual Studio.

如果你想运行在Visual Studio中的程序再考虑加入对于myapp.vshost.exe一键,因为这是用于调试。

If you wish to run the program on Visual Studio then consider adding a key for "myapp.vshost.exe" as this is used for debugging.

更多信息来源是; HTTP://weblog.west-wind。 COM /职位/ 2011 /月/ 21 / Web浏览器 - 控制 - 指定的非IE浏览器版本

我希望这有助于任何人与任何有关可能使用了错误的IE浏览器版本的包装或功能的Web浏览器按预期不工作的问题。

I hope this helps anyone with any issue regarding your Web Browser perhaps using the wrong IE version as a wrapper or functions are not working as intended.

这篇关于允许JavaScript在Windows窗体的web浏览器上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆