if(!-[1,]){

  alert("这是IE浏览器");

}else{

  alert("这不是IE浏览器");

}

源文:http://www.jb51.net/article/23621.htm