function v() {let u = navigator.userAgent, app = navigator.appVersionreturn {trident: u.indexOf('Trident') > -1, // IE内核presto: u.indexOf('Presto') > -1, // opera内核webKit: u.indexOf('AppleWebKit') > -1, // 苹果、谷歌内核gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,// 火狐内核mobile: !!u.match(/AppleWebKit.*Mobile.*/), // 是否为移动终端ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), // ios终端android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, // android终端iPhone: u.indexOf('iPhone') > -1, // 是否为iPhone或者QQHD浏览器iPad: u.indexOf('iPad') > -1, // 是否iPadwebApp: u.indexOf('Safari') == -1, // 是否web应该程序,没有头部与底部weixin: u.indexOf('MicroMessenger') > -1, // 是否微信 (-01-22新增)qq: u.match(/\sQQ/i) == ' qq', // 是否QQ };}}
如果觉得《移动端设备判断 ios android 判断设备 安卓》对你有帮助,请点赞、收藏,并留下你的观点哦!