文章分类 Classification
js判断浏览器
稿件来源: 互联网 撰稿作者: 匿名 发表日期: 2015-04-01 阅读次数: 144 查看权限: 游客查看
js判断浏览器
var ieVersion = /*@cc_on (function() {switch(@_jscript_version) {case 1.0: return 3; case 3.0: return 4; case 5.0: return 5; case 5.1: return 5; case 5.5: return 5.5; case 5.6: return 6; case 5.7: return 7; case 5.8: return 8; case 9: return 9; case 10: return 10;}})() || @*/ 0; //Internet Explorer 3-10 var ieVersion = (function() { if (new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null) { return parseFloat( RegExp.$1 ); } else { return false; } })(); //Internet Explorer ≤ 10 var isIE = !!window.ActiveXObject;//Internet Explorer 6-10 var isIE = document.all && document.compatMode; //Internet Explorer 6-10 var isIE = document.all && !document.querySelector; //Internet Explorer ≤ 7 var isIE = document.all && window.XMLHttpRequest && !document.querySelector;//Internet Explorer 7 var isIE = document.all && window.XMLHttpRequest; //Internet Explorer 7-10 var isIE = navigator.appVersion.indexOf("MSIE 7.") !== -1;//Internet Explorer 7 var isIE = !+'\v1'; //Internet Explorer ≤ 8 var isIE = '\v'=='v'; //Internet Explorer 8 var isIE = document.all && document.querySelector; //Internet Explorer 8-10 var isIE = document.all && !document.addEventListener; //Internet Explorer ≤ 8 var isIE = document.all && document.querySelector && !document.addEventListener; //Internet Explorer 8 var isIE = document.all && document.addEventListener; //Internet Explorer 9-10 var isIE = document.all && document.addEventListener && !window.atob; //Internet Explorer 9 var isIE = document.all && !window.atob; //Internet Explorer ≤ 9 var isIE = /*@cc_on!@*/false; //Internet Explorer ≤ 10 var isIE = document.all && window.atob; //Internet Explorer 10 var isIE = eval("/*@cc_on!@*/false") && document.documentMode === 10; //Internet Explorer 10 var isIE = document.body.style.msTouchAction !== undefined; //Internet Explorer ≥ 10 var isIE = window.navigator.msPointerEnabled; //Internet Explorer ≥ 10 var isIE = 'behavior' in document.documentElement.style && '-ms-user-select' in document.documentElement.style; //Internet Explorer 10 var isIE = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style; //Internet Explorer 11 var isWebkit = 'WebkitAppearance' in document.documentElement.style; // hrome * Safari ≥ 3 Opera ≥ 14 var isSafari = /constructor/i.test(window.HTMLElement); // Safari * var isOperaMini = Object.prototype.toString.call(window.operamini) === '[object OperaMini]'; //Opera Mini * var isOperaMini = (navigator.userAgent.indexOf('Opera Mini') > -1); //Opera Mini * var isOpera = !!window.opera || /opera|opr/i.test(navigator.userAgent); //Opera * var isFirefox = !!window.sidebar; //firefox * var isFirefox = !!navigator.userAgent.match(/firefox/i); //firefox * var isFirefox = 'MozAppearance' in document.documentElement.style; //firefox * var isChromium = !!window.chrome; //Chrome * Opera ≥ 14 Android 4.0.4 var isChrome = !!window.chrome && !!window.chrome.webstore; //Chrome ≥ 14
关键词: javascript,判断浏览器 编辑时间: 2015-04-01 14:21:10
0
高兴0
支持0
搞笑0
不解0
谎言0
枪稿0
震惊0
无奈0
无聊0
反对0
愤怒
0%(0)
0%(0)
- 暂无评论
文章图片 article Pictrue
网友评论