var Sys = (function (ua) {
var s = {};
s.IE = ua.match(/msie ([\d.]+)/) ? true : false;
s.Firefox = ua.match(/firefox\/([\d.]+)/) ? true : false;
s.Chrome = ua.match(/chrome\/([\d.]+)/) ? true : false;
s.IE6 = (s.IE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 6)) ? true : false;
s.IE7 = (s.IE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 7)) ? true : false;
s.IE8 = (s.IE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 8)) ? true : false;
return s;
})(navigator.userAgent.toLowerCase());
JS判断是哪一种浏览器,火狐,谷歌,ie
最新推荐文章于 2023-06-10 09:30:00 发布