有没有办法以编程方式 (C#) 查明 Internet Explorer 中是否启用了 JavaScript?
我试图在先决条件检查工具(用 C# 编写)中查找 Internet Explorer 是否启用了 JavaScript。我不想改变它......只是读出信息。它可以在注册表中的某个地方使用吗?
I'm trying to find out in a prerequisite checker tool (written in C#), if Internet Explorer has enabled JavaScript. I don't want to change it ... just read out the information. Is that available somewhere in the registry?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,您需要知道需要 javascript 的网站属于哪个安全区域。
当您知道要查找的区域时,您可以在 SOFTWARE\Windows\CurrentVersion\Internet Settings\Zones 下找到它...
但这些参数不是人类可读的,因此您需要查找有关这些参数的一些信息。
然而,这样做感觉有点粗略
我希望有人能给你一个比我更好的答案,至少是一个更简单的答案。
First you need to know what security zone the website(s) that needs javascript would fall under.
When you know what zone you are looking for you can find it under SOFTWARE\Windows\CurrentVersion\Internet Settings\Zones...
The parameters are not humanreadable though so you'd need to lookup some information regarding those.
However it all feels a bit sketchy doing it this way
I hope that someone can give you a better answer than mine, at least a simpler.
我认为 Modernizr 正是您所寻找的,它使您能够从网页的 HTML 标签中读取支持的功能。
看:
http://www.modernizr.com/
I think modernizr is what you're looking for, it enables you to read the supported features from the HTML tag of your web page.
See:
http://www.modernizr.com/