且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ie no ie 判断

更新时间:2022-10-01 17:10:27

ie no ie 判断
ie no ie 判断 wsd
var Browser = {
    isIE: (!navigator.userAgent.match(/Gecko/) && !window.opera),
    isIE7: (navigator.userAgent.match(/MSIE\s+7/i)),
    isIE8: (navigator.userAgent.match(/MSIE\s+8/i)),
    isIE6: (!navigator.userAgent.match(/Gecko/) && !window.opera) && (!navigator.userAgent.match(/MSIE\s+7/i)) && (!navigator.userAgent.match(/MSIE\s+8/i)),
    isSafari: (navigator.userAgent.match(/Safari/i)),
    isChrome: (navigator.userAgent.toLowerCase().indexOf("chrome") > -1),
    isMac: (navigator.platform.match(/mac/i)),
    isOpera: !!window.opera,
    isWindows: navigator.platform.match(/win[0-9]+/i)
};
  lhgcore.J 的浏览器检测
(function(){ 

var axt = !!window.ActiveXObject,
b ={
    ie: axt,
    i7: axt && !!window.XMLHttpRequest,
    i8: axt && !!document.querySelectorAll,
    op: !!window.opera,
    ff: !!window.Components,
    sa: !!window.openDatabase
};
lhgcore.browser = b;

})();

ie no ie 判断




本文转自豪情博客园博客,原文链接:http://www.cnblogs.com/jikey/archive/2010/03/05/1679273.html,如需转载请自行联系原作者