以下代码可判断浏览器是否是IE:
if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)){ //IE浏览器
} else { //非IE浏览器
}