根据请求头跳转判断Android&iOS
2013-12-16 14:18
267 查看
if(navigator.userAgent.match(/Android/i)) { window.location = 'http://apk.hiapk.com/m/downloads?id=com.shixun.sunwaykids&vcode=6'; } if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) { document.location = "https://itunes.apple.com/us/app/shang-hui-you-er-yuan/id725215705?mt=8"; }
相关文章推荐
- android实现摇一摇功能
- AndroidAnnotations——BackgroundTasksAndActivityBinding后台任务和activity绑定
- android ViewTreeObserver详细讲解
- Android中的Scroller类讲解
- AndroidAnnotations——Publish progress显示进度
- 用一个二维码做下载地址,自动区分是 ios 还是 android
- android 三种定时器的写法
- AndroidAnnotations——Fork join
- android 中画廊Gallery的单页滑动
- 史上最易懂的Android jni开发资料--NDK环境搭建
- Android 随笔(二) 真机调试
- android开发之adb被绑架
- android 使用开源工具ChkBugReport分析Bugreport
- Android SystemProperties设置/取得系统属性的用法总结
- 基于XMPP协议的Android即时通信系
- 高效使用Bitmaps(二) 后台加载Bitmap
- 高效使用Bitmaps(一) 大Bitmap的加载
- Android中JNI的使用方法
- android广播机制的实现
- Android Task 任务栈