Is there a way to find out programmatically (C#), if JavaScript is enabled in Internet Explorer?
I'm trying to f开发者_JAVA技巧ind 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?
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.
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/
精彩评论