var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger"
|| ua.match(/iphone os/i) == "iphone os" || ua.match(/ipad/i) == "ipad"
|| ua.match(/android/i) == "android" || ua.match(/midp/i) == "midp"
|| ua.match(/rv:1.2.3.4/i) == "rv:1.2.3.4" || ua.match(/ucweb/i) == "ucweb"
|| ua.match(/windows ce/i) == "windows ce" || ua.match(/windows mobile/i) == "windows mobile") {
alert("移动端"); }
相关文章
- 移动端--用PX为单位+JS框架 实现页面布局
- 移动站适配rel=alternate PC页和H5页适配标注
- 一个基于canvas开发,封装于Vue组件的通用手写签名板(电子签名板),支持pc端和移动端
- 原生JS实现移动端的轮播效果
- H5(移动端)前端使用input type=file 上传图片,调用相机和相册
- 如何禁用移动端页面的多点触控和手势缩放
- 微信js调用摄像头拍照上传_微信端调取相册和摄像头,实现图片上传,并上传到本地服务器...
- 一篇文章搞懂,vue中pc端与移动端适配解决方案(亲测有效)
- JS pc端和移动端共同实现复制到剪贴板功能实现
- 对端边缘云网络计算模式:透明计算、移动边缘计算、雾计算和Cloudlet