JavaScript test browser to IE is which version of the code, including whether it is the most extreme disgust ie6 recognition and detection.
code is as follows:


var isIE=!!!! Window. The ActiveXObject;
var isIE6=isIE&& ! Window. The XMLHttpRequest;
var isIE8=isIE&& !!!!!!!!!! Document. The documentMode;
var isIE7=isIE&& ! IsIE6 & & ! IsIE8;
the if (isIE) {
the if (isIE6) {
alert (" 6 ");
} else if (isIE8) {
alert (" 8 ");
} else if (isIE7) {
alert (" 7 ");

}}

code is as follows:


var ie=0 + 1 @ *//* @ cc_on;

a shortest js judgment or ie ie code, size 7 bytes:
code is as follows:


var ie=! + '\ v1';

code is as follows:


var ie=! - [1];

use of the findings, we can make less code to write. Now check for IE6 in fact can be written as:
code is as follows:


var IE6=! - [1] & & ! Window. The XMLHttpRequest;

before the large cumbersome analysis the navigator, then the regular way, the back of the js method is more efficient!


This concludes the body part