fastclick中的用户代理判断:

windows Phone

/*** Windows Phone 8.1 fakes user agent string to look like Android and iPhone.** @type boolean*/var deviceIsWindowsPhone = navigator.userAgent    .indexOf("Windows Phone") >= 0;

Android

/*** Android requires exceptions.** @type boolean*/var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0     && !deviceIsWindowsPhone;

IOS

/*** iOS requires exceptions.** @type boolean*/var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent)     && !deviceIsWindowsPhone;

IOS4

/*** iOS 4 requires an exception for select elements.** @type boolean*/var deviceIsIOS4 = deviceIsIOS     && (/OS 4_\d(_\d)?/).test(navigator.userAgent);

IOS6~7

/*** iOS 6.0-7.* requires the target element to be manually derived** @type boolean */var deviceIsIOSWithBadTarget = deviceIsIOS     && (/OS [6-7]_\d/).test(navigator.userAgent);

黑莓

/*** BlackBerry requires exceptions.** @type boolean*/var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;

更多相关文章

  1. Android(安卓)闪光灯
  2. Application 判断 是否在主进程、主线程
  3. Android(安卓)cmwap网络方式下使用 webview
  4. android 上下左右手势判断
  5. Android(安卓)联网设置
  6. android 判断真机还是虚拟机的方法汇总
  7. Android判断主线程
  8. 大图片文件压缩保存本地,返回本地url
  9. Android(安卓)可靠判断是不是Debug版本

随机推荐

  1. 使用SDK Manager更新时出现问题
  2. android拨打电话
  3. Android监听消息通知栏点击事件
  4. Android手机震动抖动效果的实现
  5. checkbox 文字与多选框的对齐问题
  6. 打开Android(安卓)Studio报错,Unable to c
  7. 修改ProgressBar的进度条颜色
  8. android 使用xml定义自己的View
  9. Android(安卓)Application Fundamentals
  10. Android中字体的处理