The following third test is available
The first type:
Copy the codeThe code is as follows:
if(){
alert("not ie");
}else if(){
alert("is ie");
}else{
alert("This happens in older browsers that do not support DHTML (it is generally supported now)")
}
The second type:
Copy the codeThe code is as follows:
if(){
alert("IE6");
}else{
alert("not ie");
}
The third type:
Copy the codeThe code is as follows:
var navigatorName = "Microsoft Internet Explorer";
var isIE = false;
if( == navigatorName ){
isIE = true;
alert("ie")
}else{
alert("not ie")
}
The fourth type:
Copy the codeThe code is as follows:
if(!+[1,])alert("This is ie browser");
else alert("This is not an ie browser");