js判断访问终端】的更多相关文章

//判断访问终端 var browser={ versions:function(){ var u = navigator.userAgent, app = navigator.appVersion; return { trident: u.indexOf('Trident') > -1, //IE内核 presto: u.indexOf('Presto') > -1, //opera内核 webKit: u.indexOf('AppleWebKit') > -1, //苹果.谷歌内核…
// 判断访问终端类型 var browser = { versions: function() { var u = navigator.userAgent, app = navigator.appVersion; return { trident: u.indexOf('Trident') > -1, //IE内核 presto: u.indexOf('Presto') > -1, //opera内核 webKit: u.indexOf('AppleWebKit') > -1, //苹…
http://www.sucaihuo.com/php/813.html http://www.thinkphp.cn/extend/767.html http://blog.csdn.net/gf771115/article/details/44620399…
JS判断设备终端(PC,iPad,iPhone,android,winPhone)和浏览器 var ua = navigator.userAgent; var browser = {}, weixin = ua.match(/MicroMessenger\/([^\s]+)/i), webkit = ua.match(/WebKit\/([\d.]+)/i), android = ua.match(/(Android)\s+([\d.]+)/i), ipad = ua.match(/(iPad)…
先给出一个实例:判断windows.linux.android 复制以下代码另存为html文件即可. <html> <head> <title>判断操作系统</title> <script type="text/javascript"> function detectOS() { var sUserAgent = navigator.userAgent; var isWin = (navigator.platform == &…
本文转自:http://www.cnblogs.com/duanguyuan/p/3534470.html 先给出一个实例:判断windows.linux.android 复制以下代码另存为html文件即可. <html> <head> <title>判断操作系统</title> <script type="text/javascript"> function detectOS() { var sUserAgent = nav…
//平台.设备和操作系统 var system ={ win : false, mac : false, xll : false }; //检测平台 var p = navigator.platform; system.win = p.indexOf(; system.mac = p.indexOf(; system.x11 = (p == ); //跳转语句 if(system.win||system.mac||system.xll){ alert("PC访问"); }else{ a…
PHP和js判断访问设备是否是微信浏览器实例,代码非常精简,适合新手学习. js判断是否是微信浏览器: 1 function is_weixin() { 2 var ua = window.navigator.userAgent.toLowerCase(); 3 if (ua.match(/MicroMessenger/i) == 'micromessenger') { 4 $("#rs").text("微信浏览器"); 5 } else { 6 $("#…
在做移动端项目的时候,常常会遇到需要判断页面浏览终端的需求.要想判断是什么浏览器终端,先打印 navigator.userAgent 出来.所以收集了几种比较常用的方法: if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { //IOS window.location.href = "https://itunes.apple.com/cn/app/fu-xing-zhi-hui-jia/id1081255502?mt=8";…
方法1: <script type="text/javascript">         var browser = {             versions: function () {                 var u = navigator.userAgent, app = navigator.appVersion;                 return {//移动终端浏览器版本信息                     trident: u.…