JS

问题:使用JS判断是否为IE浏览器

方法:

1.IE='v'=='v'  (失败!)

if('v'=='v') // true only in IE

2.IE=(!+"v1")  (失败!)

if(!+"v1") // true only in IE

3.IE=top.execScript?1:0

if(top.execScript?true:false) // true only in IE
原文地址:https://www.cnblogs.com/tx8899/p/4727487.html