userAgent判断客户端,以及各个浏览器的ua
http://blog.csdn.net/yoyoosyy/article/details/70142884
navigator.userAgent.match(/Android/i) //安卓客户端浏览器
navigator.userAgent.indexOf('iPhone') != -1) //iPhone手机客户端
navigator.userAgent.indexOf('iPod') != -1) //iPod 客户端
navigator.userAgent.indexOf('iPad') != -1 //iPad 客户端
<pre class="js" style="" name="code">
if(navigator.userAgent.match(/Android/i)||(navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) {
$("#common_header,#common_navbar,#backtotop,#footer").hide();
}
</pre><br><br><br>
<p style="">uc:</p>
<p style="">Mozilla/5.0 (Linux; U;<span> </span><strong style="font-weight:700">Android</strong><span> </span>4.4.2; zh-CN; NX505J Build/KVT49L) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0<span> </span><strong style="font-weight:700">UCBrowser</strong>/10.5.2.598 U3/0.8.0 Mobile Safari/534.30</p>
<p style="">Mozilla/5.0 (iPhone; CPU<span> </span><strong style="font-weight:700">iPhone</strong><span> </span>OS 9_3_3 like Mac OS X; zh-CN) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/13G34<span> </span><strong style="font-weight:700">UCBrowser</strong>/10.9.19.815 Mobile<br style=""></p>
<p style="">手机百度:</p>
<p style="">Mozilla/5.0 (Linux;<span> </span><strong style="font-weight:700">Android</strong><span> </span>4.4.2; NX505J Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/35.0.1916.138 Mobile Safari/537.36 T7/7.1<strong style="font-weight:700">baiduboxapp</strong>/7.5.1 (Baidu; P1 4.4.2)<br style=""></p>
<p style="">Mozilla/5.0 (iPhone; CPU<span> </span><strong style="font-weight:700">iPhone</strong><span> </span>OS 9_3_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G34<strong style="font-weight:700">baiduboxapp</strong>/0_7.0.5.7_enohpi_4331_057/3.3.9_1C2%258enohPi/1099a/B80ADBCDA918AA94450DE8767C97BC446249D6087FCLPRHEEPF/1<br style=""></p>
<p style="">百度浏览器:<br style=""></p>
<p style="">Mozilla/5.0 (Linux;<span> </span><strong style="font-weight:700">Android</strong><span> </span>4.4.2; NX505J Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/35.0.1916.138 Mobile Safari/537.36 T7/7.2<strong style="font-weight:700">baidubrowser</strong>/7.3.14.0 (Baidu; P1 4.4.2)</p>
<p style="">Mozilla/5.0 (iPhone; CPU<span> </span><strong style="font-weight:700">iPhone</strong><span> </span>OS 9_3_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.3 Mobile/13G34 Safari/600.1.4<strong style="font-weight:700">baidubrowser</strong>/4.2.0.324 (Baidu; P2 9.3.3)<br style=""></p>
<p style="">qq:</p>
<p style="">Mozilla/5.0 (Linux;<span> </span><strong style="font-weight:700">Android</strong><span> </span>4.4.2; NX505J Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile<span> </span><strong style="font-weight:700">MQQBrowser</strong>/6.2 TBS/036555 Safari/537.36 V1_AND_SQ_6.3.7_374_YYB_D PA QQ/6.3.7.2795 NetType/WIFI WebP/0.3.0 Pixel/1080<br style=""></p>
<p style="">Mozilla/5.0 (iPhone; CPU<span> </span><strong style="font-weight:700">iPhone</strong><span> </span>OS 9_3_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G34<span> </span><strong style="font-weight:700">QQ</strong>/6.5.0.443 V1_IPH_SQ_6.5.0_1_APP_A Pixel/750 Core/UIWebView NetType/WIFI Mem/41<br style=""></p>
<p style="">qq空间:</p>
<p style="">Mozilla/5.0 (Linux;<span> </span><strong style="font-weight:700">Android</strong><span> </span>4.4.2; NX505J Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile<span> </span><strong style="font-weight:700">MQQBrowser</strong>/6.2 TBS/036555 Safari/537.36 V1_AND_SQ_6.3.7_374_YYB_D QQ/6.3.7.2795 NetType/WIFI WebP/0.3.0 Pixel/1080<br style=""></p>
<p style="">Mozilla/5.0 (iPhone; CPU<span> </span><strong style="font-weight:700">iPhone</strong><span> </span>OS 9_3_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G34<span> </span><strong style="font-weight:700">QQ</strong>/6.5.0.443 V1_IPH_SQ_6.5.0_1_APP_A Pixel/750 Core/UIWebView NetType/WIFI Mem/169<br style=""></p>
<p style="">qq浏览器:</p>
<p style="">Mozilla/5.0 (Linux; U;<span> </span><strong style="font-weight:700">Android</strong><span> </span>4.4.2; zh-cn; NX505J Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0<strong style="font-weight:700">MQQBrowser</strong>/6.8 Mobile Safari/537.36<br style=""></p>
<p style="">Mozilla/5.0 (iPhone 6s; CPU<span> </span><strong style="font-weight:700">iPhone</strong><span> </span>OS 9_3_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/6.0<span> </span><strong style="font-weight:700">MQQBrowser</strong>/6.8.1 Mobile/13G34 Safari/8536.25 MttCustomUA/2<br style=""></p>
<p style="">微信:</p>
<p style="">Mozilla/5.0 (Linux;<span> </span><strong style="font-weight:700">Android</strong><span> </span>4.4.2; NX505J Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile MQQBrowser/6.2 TBS/036548 Safari/537.36<span> </span><strong style="font-weight:700">MicroMessenger</strong>/6.3.18.800 NetType/WIFI Language/zh_CN<br style=""></p>
<p style="">Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G34<span> </span><strong style="font-weight:700">MicroMessenger</strong>/6.3.23 NetType/WIFI Language/zh_CN<br style=""></p>
<p style="">微博:</p>
<p style="">Mozilla/5.0 (Linux;<span> </span><strong style="font-weight:700">Android</strong><span> </span>4.4.2; NX505J Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36<span> </span><strong style="font-weight:700">Weibo</strong><span> </span>(nubia-NX505J__weibo__6.8.0__android__android4.4.2) tae_sdk_a_2.0.0 AliApp(BC/2.0.0)<br style=""></p>
<p style="">Mozilla/5.0 (iPhone; CPU<span> </span><strong style="font-weight:700">iPhone</strong><span> </span>OS 9_3_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13G34<span> </span><strong style="font-weight:700">Weibo</strong>(iPhone8,1__weibo__6.8.1__iphone__os9.3.3) AliApp(BC/2.1) tae_sdk_ios_2.1 havana</p>
<br>
userAgent判断客户端,以及各个浏览器的ua的更多相关文章
- 如何通过navigator.userAgent判断是哪款浏览器?
userAgent 用户代理.通过浏览器控制台alert( navigator.userAgent );可以获得当前浏览器的信息,如果逆推呢? 通过navigator.userAgent判断是哪款浏览 ...
- 根据User Agent参数的各个字段Mozilla/5.0/4.0-AppleWebKit/Chrome/Safari/Firefox/Opera/MSIE来确定/判断客户端使用什么浏览器
下面给你一一解答以及给你介绍: //Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN) AppleWebKit/533.21.1 (KHTML, like ...
- php 通过http user-agent判断是否为手机浏览器
<?php/*** 判断是否是通过手机访问* @return bool 是否是移动设备 */public function isMobile() { //判断手机发送的客户端标志 if ...
- JS判断客户端是否是iOS或者Android或者ipad(三)
* * @function: 判断浏览器类型是否是Safari.Firefox.ie.chrome浏览器 * @return: true或false * */ function isSafa ...
- H5案例分享:使用JS判断客户端、浏览器、操作系统类型
使用JS判断客户端.浏览器.操作系统类型 一.JS判断客户端类型 JS判断客户端是否是iOS或者Android手机移动端 通过判断浏览器的userAgent,用正则来判断手机是否是ios和Androi ...
- HTTP请求中的User-Agent 判断浏览器类型的各种方法 网络爬虫的请求标示
我们知道,当用户发送一个http请求的时候,浏览的的版本信息也包含在了http请求信息中: 如上图所示,请求 google plus 请求头就包含了用户的浏览器信息: User-Agent:Mozil ...
- JS判断客户端、浏览器、操作系统
一.JS判断客户端是否是iOS或者Android手机移动端 通过判断浏览器的userAgent,用正则来判断手机是否是ios和Android客户端. 方法一: var u = navigator.us ...
- 使用JS判断客户端、浏览器、操作系统类型
一.JS判断客户端类型 JS判断客户端是否是iOS或者Android手机移动端 通过判断浏览器的userAgent,用正则来判断手机是否是ios和Android客户端. 核心代码如下: 方法一: &l ...
- JS判断浏览器类型,JS判断客户端操作系统
JS判断浏览器类型 function judge(){ var browser = { versions: function() { var u = navigator.userAgent, app ...
随机推荐
- ifreq、ifconf
网络相关的ioctl请求的request参数及arg地址必须指向的数据类型如下表所示: 接口 SIOCGIFCONF SIOCSIFADDR SIOCGIFADDR SIOCSIFBRDADDR SI ...
- HTML5学习笔记简明版(11):新增的API
HTMLDocument上的扩展 HTML5在DOM Level 2 HTML上扩展了一些HTMLDocument的接口.这些接口在全部实现了Document接口的元素对象上进行了实现. HTML5在 ...
- 给QQ群发送消息
地址:http://d.web2.qq.com/channel/send_qun_msg2 方式:POST 參数: r = {"group_uin":2393471267,&qu ...
- leetcode -day23 Construct Binary Tree from Inorder and Postorder Traversal & Construct Binary Tree f
1. Construct Binary Tree from Inorder and Postorder Traversal Given inorder and postorder travers ...
- vue27-2.0-自定义键盘事件
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- quartz 持久化 数据库表
此处只包括配置数据库操作 quartz 持久化数据库表格字段解释建表,SQL语句在dbTables文件夹中可以找到,介绍下我们开发主要使用到的表: (版本不一样,可能数据库表也不一样,这里使用2.2. ...
- mybatis :与Spring MVC 的集成
用mybatis与Spring mvc 的方式集成起来,源码在本文结尾处下载.主要有以下几个方面的配置1. web.xml 配置 spring dispatchservlet ,比如为:mvc-dis ...
- dubbo+zookeeper+springMVC +maven
pom: <dependency> <groupId>com.github.sgroschupf</grou ...
- OpenGL编程逐步深入(四)Shaders
OpenGl 中的 Shader在一些中文书籍或资料中都被翻译为"着色器", 单从字面意思也看不出Shader到底是什么,Shader实际上就是一段代码,用于完成特定功能的一个模块 ...
- noip 2018 day1 T2 货币系统 完全背包
Code: #include<cstdio> #include<string> #include<cstring> #include<algorithm> ...