获取ie浏览器版本号
/**
* 获取ie浏览器版本号
* @returns
*/
function getInternetExplorerVersion(){ var version = -1; // Return value assumes failure.
if (navigator.appName == 'Microsoft Internet Explorer'||navigator.appName=="Netscape") { var ua = navigator.userAgent.toLowerCase();
var strRegIE1 = /msie [\d.]+;/gi;
var strRegIE2 = /rv:[\d.]+/;
var ieInfo = ua.match(strRegIE1) ;
if ( null === ieInfo){
ieInfo = ua.match(strRegIE2);
}
ieInfo = ieInfo+"";
var version = ieInfo.replace(/[^0-9.]/ig,"");
}
return version;
}
获取ie浏览器版本号的更多相关文章
- PHP 获取 IE浏览器版本号
function getIEBrowserVersion(){ $agent = strtolower($_SERVER['HTTP_USER_AGENT']); if(strpos($agent, ...
- js 获取浏览器版本号
1.在web开发中,会常常让你推断当前使用的是那个浏览器及浏览器的那个版本号,依据浏览器版本号来调整CSS的样式, 使在web界面在各个浏览器展现达到最佳的效果,以下是获取当前浏览器的代码: getB ...
- 闭包和重写函数 返回IE浏览器版本号
开发过程中我们有时候需要知道IE的版本号,我们知道得到IE的版本号的方法: var v = 3, div = document.createElement('div'), all = div.getE ...
- asp.net获取客户端浏览器及主机信息
在线预览效果:http://tool.hovertree.com/info/client/ 其中aspx页面的控件代码: <asp:ListBox runat="server" ...
- JS 获取当前浏览器类型
JS代码: function getType() { if(navigator.userAgent.indexOf("MSIE")>0) { return "MSI ...
- .Net Web Api——获取client浏览器信息
第一次接触到web api,发现这个东西是REST风格的:---- 微软的web api是在vs2012上的mvc4项目绑定发行的.它提出的web api是全然基于RESTful标准的,全然不同于之前 ...
- iOS获取当前AppStore版本号与更新
- (void)checkUpdateWithAppID:(NSString *)appID success:(void (^)(NSDictionary *resultDic , BOOL isNe ...
- JS获取当前浏览器的类型
<script type=“text/javascript”> function isIE(){return navigator.appName.indexOf(“Microsoft In ...
- JS获取各种浏览器窗口大小的方法
常用:JS 获取浏览器窗口大小复制代码 代码如下:// 获取窗口宽度if (window.innerWidth)winWidth = window.innerWidth;else if ((docum ...
随机推荐
- GIT使用教程与基本原理
转自:http://blog.csdn.net/wengpingbo/article/details/8985132 说明:该教程全部图片都来自于<pro git>.以下所有的操作,除非特 ...
- linux系统设置服务开机启动3种方法,Linux开机启动程序详解
linux系统设置服务开机启动 方法1:.利用ntsysv伪图形进行设置,利用root登陆 终端命令下输入ntsysv 回车:如下图 方法2:利用命令行chkconfig命令进行设置 简要说明 ...
- JavaScript constructor 属性
定义和用法 constructor 属性返回对创建此对象的数组函数的引用. 语法 object.constructor 实例 例子 1 在本例中,我们将展示如何使用 constructor 属性: & ...
- 设置mysql的interactive_timeout和wait_timeout的值
1,为什么要重新设置这两个变量的值? 因为如果数据库默认这两个变量的值是8小时(即28800秒)如果在8小时之内没有连接到数据库,等下次再连的时候就会抛连接超时,或连接关闭这样的异 常,但是多连接几次 ...
- UVa 11542 (高斯消元 异或方程组) Square
书上分析的太清楚,我都懒得写题解了.=_=|| #include <cstdio> #include <cstring> #include <cmath> #inc ...
- UVa 10285 Longest Run on a Snowboard【记忆化搜索】
题意:和最长滑雪路径一样, #include<iostream> #include<cstdio> #include<cstring> #include <c ...
- IIS Server is too busy 解决方法(IIS6)
Server is too busy意思是服务器繁忙,资源不够用 为什么会出现这个问题呢? 因为服务器的配置不同,所能承受的压力不同. 而服务器默认对链接数,线程数等有设置,但这个设置太小,基本不够用 ...
- Selenium Tutorial (2) - Selenium IDE In Depth
Installing Firefox and Firebug Installing and Opening Selenium IDE Starting with test cases and test ...
- shape的属性(二)
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="r ...
- codevs 1137 计算系数
什么时候NOIP也要出二项式定理了? 二项式定理+逆元. #include<iostream> #include<cstdio> #include<cstring> ...