$(function(){
var u = navigator.userAgent;
var ua = navigator.userAgent.toLowerCase();
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if(ua.match(/MicroMessenger/i)=="micromessenger") { //微信内置浏览器+应用宝链接
$(".download a").bind('touchstart', function (event) {
window.location.href='http://a.app.qq.com/o/simple.jsp?pkgname=应用名 '
});
}else{
if(isiOS){
$(".download a").bind('touchstart', function (event) {
window.location.href='https://itunes.apple.com/cn/app/应用名' });
}else if(isAndroid){
$(".download a").bind('touchstart', function (event) {
window.location.href='http://a.app.qq.com/o/simple.jsp?pkgname=应用名' });
}else{ //PC 端
$(".download a").click(function(){
window.location.href='应用链接'
});
} } });

判断ios还是android的更多相关文章

  1. 移动端判断ios还是android终端

    <script> //判断ios还是android终端       var u = navigator.userAgent;       var isAndroid = u.indexOf ...

  2. 判断IOS、Android访问

    /*判断手机访问是Android还是IOS*/ $user_agent = $_SERVER['HTTP_USER_AGENT']; if(stripos($user_agent, "iPh ...

  3. uniapp 判断 IOS和Android的GPS是否开启并设置启动

    checkOpenGPSServiceByAndroidIOS() { let system = uni.getSystemInfoSync(); // 获取系统信息 console.log(syst ...

  4. 移动端H5 判断IOS还是Android 平台

    1.方法 (function($) { var UA = window.navigator.userAgent; if(/Android|HTC/i.test(UA) || !!(window.nav ...

  5. 判断ios或者android

    <script type="text/javascript"> $(function () { // android和iso下载链接 var u = navigator ...

  6. JS判断是否是微信页面,判断手机操作系统(ios或android)并跳转到不同下载页面

    JS判断客户端是否是iOS或者Android 参考:http://caibaojian.com/browser-ios-or-android.html function is_weixin() { v ...

  7. JS判断客户端是否是iOS或者Android

    通过判断浏览器的userAgent,用正则来判断是否是ios和Android客户端.代码如下: <script type="text/javascript"> var ...

  8. JavaScript_JS判断客户端是否是iOS或者Android

    通过判断浏览器的userAgent,用正则来判断是否是ios和Android客户端.代码如下: <script type="text/javascript"> var ...

  9. 判断是ios还是android

    //判断是ios还是androidvar system;var ua = navigator.userAgent.toLowerCase(); if (/iphone|ipad|ipod/.test( ...

随机推荐

  1. 金蝶CLOUD与EAS的区别

    1.金蝶K/3 WISE主要面向单体制造企业(主要是离散制造企业):2.金蝶K/3 Cloud主要面向业务类型单一(即主营业务单一)的.注重供应链与生产业务协同的.中小型(二层集团??)集团性企业(主 ...

  2. how to build an app with github

    how to build an app with github Building apps https://developer.github.com/apps/ demos https://githu ...

  3. java_manual的一点体会

    最近看了一下Alibaba的java_manual1.4,看了感觉有很多好的标准,这里摘录一些,也帮助自己的代码更加规范化 先放一些MySQL的规范: 这里附上MySQL官网给的参考手册上的 关键字和 ...

  4. OSError: mysql_config not found

    使用Python3开发一个管理平台,用MySQL数据库存放元数据.使用pip安装mysqlclient模块时出现“OSError: mysql_config not found”错误. 解决: # a ...

  5. powerdesigner 16.5 不允许有扩展属性,或对象不存在

    创建完之后这边会出现 选择刚创建的用户 这样就可以了

  6. codeforces569B

    Inventory CodeForces - 569B Companies always have a lot of equipment, furniture and other things. Al ...

  7. mysql,mybatis模糊查询

    <if test="deviceType != null and deviceType != ''">and device_type like CONCAT('%', ...

  8. mysql 下载地址

    新浪的镜像站 http://mirrors.sohu.com/mysql yum安装: 首先要到MySQL yum库的下载页面http://dev.mysql.com/downloads/repo/y ...

  9. Mail.Ru Cup 2018 Round 2

    A:阅读理解. #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> ...

  10. BZOJ2809 dispatching 【可并堆】

    题目分析: yy一下就知道了,合并用可并堆少个log. 代码: #include<bits/stdc++.h> using namespace std; ; int n,m; int b[ ...