HanG321 Blog

Detect IE version

 

(Uncomment the second line if you also wish to check whether IE is running in “compatibility” (quirks) mode or in standards-mode.)

All other browsers cheerfully ignore the Javascript comment block (/* … */) so what they end up with is essentially this:

var is_ie;

…which evaluates as an implicit false, when used as a condition. This allows us to set up conditions like this one:

 

[reference : http://mar.anomy.net/entry/2006/11/23/00.06.40/ ]


Technorati : , ,