ie8以下
if(!+[1,])
if(window.attachEvent){ alert("ie")}else if(window.addEventListener){alert("not ie")}else{alert("不支持DHTML")}
ie6
if(document.all)
ie浏览器 !ie 浏览器
var navigatorName = "Microsoft Internet
Explorer";
var isIE = false;
if(
navigator.appName == navigatorName ){
isIE =
true;
alert("ie")
}else{
alert("not
ie")
}
原文:http://www.cnblogs.com/liujie1111/p/3777063.html