dkfr.net
当前位置:首页 >> js获取iE版本号 >>

js获取iE版本号

IE6~IE10的浏览器特征明显,存在msie字符串,而IE11去掉了msie字符串,可以通过rv后面的版本号识别IE11,具体方法如下: function IETester(userAgent){ var UA = userAgent || navigator.userAgent; if(/msie/i.test(UA)){ return UA.match(/ms...

用js的Navigator对象 txt = "Browser CodeName: " + navigator.appCodeName + ""; txt+= "Browser Name: " + navigator.appName + ""; txt+= "Browser Version: " + navigator.appVersion + ""; txt+= "Cookies Enabled: " + navigator.cookieEn...

var browser=navigator.appNamevar b_version=navigator.appVersionvar version=parseFloat(b_version)document.write("浏览器名称:"+ browser)document.write("")document.write("浏览器版本:"+ version)更多 document.write("浏览器:")docu...

function getExplorerInfo() { var explorer = window.navigator.userAgent.toLowerCase() ; //ie if (explorer.indexOf("msie") >= 0) { var ver=explorer.match(/msie ([\d.]+)/)[1]; return {type:"IE",version:ver}; } //firefox else if (e...

if navigator.userAgent.indexOf(”MSIE”)>0) {} //判断是否IE浏览器if(isFirefox=navigator.userAgent.indexOf(”Firefox”)>0){ }判断是否火狐浏览器if(isSafari=navigator.userAgent.indexOf(”Safari”)>0) {}判断是否Safari浏览器 if(isSafari=n...

function message(){ txt = "浏览器代码名: " + navigator.appCodeName + "";txt+= "浏览器名称: " + navigator.appName + ""; txt+= "浏览器平台和版本: " + navigator.appVersion + "";txt+= "是否开启cookie: " + navigator.cookieEnabled + ...

(function (win, doc, nav){/** * @des 浏览器判断脚本,兼容cmd规范 */var ua = nav.userAgent.toLowerCase (), key ={ ie : "msie", sf : "safari", tt : "tencenttraveler"},// 正则列表reg ={ browser : "(" + key.ie + "|" + key.sf + "|fir...

var isIE = function(ver){ var b = document.createElement('b') b.innerHTML = '' return b.getElementsByTagName('i').length === 1}alert('ie6:' + isIE(6) + '\n' + 'ie7:' + isIE(7) + '\n' + 'ie8:' + isIE(8) + '\n' + 'ie9:' + isIE(9)...

测试if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion .split(";")[1].replace(/[ ]/g,"")=="MSIE6.0" || navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion .split(";")[1].replace...

var browser=navigator.appName var b_version=navigator.appVersion var version=b_version.split(";"); var trim_Version=version[1].replace(/[ ]/g,""); if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE7.0") { alert("...

网站首页 | 网站地图
All rights reserved Powered by www.dkfr.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com