Using code to check if IE add on is enabled in Mozilla

I want to check if the Internet Explorer Rendering engine is turned on in Mozilla browser, then I hide some control in my code. If the browser itself is Internet Explorer, then I want to show control.

So The question is how to I detect and differentiate between Internet Explorer Rendering engine is tured on in Mozilla browser and Internet Explorer browser?

User Agent of navigation object for mozilla browser with IE turn on is:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)

User Agent of navigation object for IE browser:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)

链接地址: http://www.djcxy.com/p/51914.html

上一篇: userAgent的结果不同于PHP到JavaScript

下一篇: 使用代码检查在Mozilla中是否启用了IE附加功能