标签:安卓 useragent user oid 设备 mac os tor navig san
var u = navigator.userAgent
var isAnd = u.indexOf(‘Android‘) > -1 || u.indexOf(‘Adr‘) > -1//安卓
var ios = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)//ios
if(isAnd)console.log(‘安卓‘)
if(ios)console.log(‘ios‘)
标签:安卓 useragent user oid 设备 mac os tor navig san
原文地址:https://www.cnblogs.com/MrzhangRecord/p/9481079.html