The third kind of pro -test can be available in the following
The first type:
Copy code code as follows:
if (Window.addeventListener) {
alert ("not ie");
} else if (window.attachevent) {
Alert ("IS IE");
} Else {
Alert ("This situation occurs in the old version of the browser that does not support DHTML (now supports)"))))
}
The second type:
Copy code code as follows:
if (document.all) {
alert ("IE6");
} Else {
alert ("not ie");
}
Third type:
Copy code code as follows:
var navigatorName = "Microsoft Internet Explorer";
var isie = false;
if (if (navigator.appname == navigatorName) {
isie = true;
alert ("IE")
} Else {
Alert ("not ie")
}
The fourth type:
Copy code code as follows:
if (!+[1,]) Alert ("This is IE browser");
else alert ("This is not an IE browser");