标签:oid and div 终端 || isa nbsp match mac os x
/** * @name 判断iOS */ export const isiOS = ()=>{ let u = navigator.userAgent; let iOs = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端\ return iOs; } /** * @name 判断android */ export const isAndroid = ()=>{ let u = navigator.userAgent; let android = u.indexOf(‘Android‘) > -1 || u.indexOf(‘Adr‘) > -1; //android终端 return android }
标签:oid and div 终端 || isa nbsp match mac os x
原文地址:https://www.cnblogs.com/huancheng/p/11315688.html