判断浏览器类型

var ag = navigator.userAgent.toLowercase();

isIE7 = ag.indexOf('msie 7') > -1

isIE8 = ag.indexOf('msie 8') > -1

感觉IE8,跟firefox用得内核是一样的。

因为当时我测试的一个程序,在firefox下,不转码,IE版本小于8的浏览器中,需转码,但到IE8上了,程序又不用转码了。

版本这么多。。真麻烦

原文地址:https://www.cnblogs.com/flex_fly/p/1794137.html