The third type of personal test is available below
First type:
if(window.addEventListener ){
alert("not ie");
}else if(window.attachEvent){
alert("is ie");
}else{
alert("This kind of This happens in older browsers that do not support DHTML (now generally supported)")
}
Second type:
if(document.all ){
alert("IE6");
}else{
alert("not ie");
}
Third type:
var navigatorName = "Microsoft Internet Explorer";
var isIE = false;
if( navigator.appName == navigatorName ){
isIE = true;
alert("ie")
}else{
alert("not ie")
}
Fourth method:
if(! [1 ,])alert("This is Internet Explorer");
else alert("This is not Internet Explorer");
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn