JS判断当前设备是 PC IOS Andriod】的更多相关文章

JS判断当前设备是 PC IOS Andriod <script > window.onload = function(){ var isPc = IsPC(); var isAndroid = is_android(); if (isPc){ //pc location.href = url; }else{ if (isAndroid){ //安卓 location.href = ""; }else{ //IOS location.href = "";…
varbrowser = {   versions: function () {      var u = navigator.userAgent, app = navigator.appVersion;      return {     //移动终端浏览器版本信息        trident: u.indexOf('Trident') > -1, //IE内核        presto: u.indexOf('Presto') > -1, //opera内核        webKit…
js判断移动端与pc端   这里介绍下使用device.js插件来判断移动端设备 地址:https://github.com/matthewhudson/device.js 示例: 1 2 3 4 5 6 7 if(device.mobile()){     window.location.href = "移动端地址";         //alert("移动端"); } else {        window.location.href = "PC端地…
先给出一个实例:判断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…
非常实用的js判断手机端操作系统(Andorid/IOS),并自动跳转相应下载界面 androidURL = "http://xxx/xxx.apk"; var browser = { versions: function() { var u = navigator.userAgent, app = navigator.appVersion; return { android: u.indexOf('Android') > -1 || u.indexOf('Linux') >…
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 $("#…
JS判断移动端还是PC端(改造自腾讯网 http://www.qq.com/) 本脚本仅用于宣传动画,下载页( ipad 也算pc端)等,  ionic 用 ionic.platform 即可( ionic.platform的匹配机型没有腾讯的脚本全面) // 改造自腾讯网     function isMobile(){                var u = navigator.userAgent;         if(/AppleWebKit.*Mobile/i.test(u) |…
js如何判断用户是在PC端和还是移动端访问.  最近一直在忙我们团队的项目“咖啡之翼”,在这个项目中,我们为移动平台提供了一个优秀的体验.伴随Android平台的红火发展.不仅带动国内智能手机行业,而且许多国内开发者也开始投身于Android移动终端的大浪潮中.如果很多互联网大浪潮你错过了.那么这个Android浪潮你绝对不能错过.目前我们为“咖啡之翼”已经开发了移动终端以及安卓客户端,大家使用Android或者IOS操作系统的手机,直接访问域名www.jbxue.com即可观看移动终端效果.同…