通过获取浏览器的userAgent, 进行判断

var userAgent = navigator.userAgent.toLowerCase(); 

if(userAgent .match(/MicroMessenger/i)==”micromessenger”) {

    alert("weixin"); 

}

if(userAgent .match(/android/i)) == "android") {  

    alert("android");  

}  

if(userAgent .match(/iPhone/i)) == "iPhone"){  

    alert("iPhone");  

}  

if(userAgent .match(/iPad/i)) == "iPad"){  

    alert("iPad");  

更多相关文章

  1. Android获取浏览器User Agent
  2. Android自制浏览器WebView-android学习之旅(64)
  3. android ImageView实现图片浏览器(点击左侧显示上一张,点击右侧显
  4. 关于android 调用系统图片浏览器并返回图片路径问题
  5. android2.2中默认浏览器无法使用手势放大缩小页面的问题定位
  6. Android 浏览器CSS 居中
  7. Android类似UC浏览器翻屏以及popuwindow动画弹出

随机推荐

  1. Failed to fetch URL http://dl-ssl.goog
  2. checkbox 与listview 点击事件冲突
  3. CentOS7配置Android打包环境
  4. title上左右按钮
  5. Android xml 深入解析shape
  6. asasasa
  7. Android: Android Reboot流程
  8. android中的tab小结
  9. asss
  10. android安装SDK时遇到的一些问题