判断是ios手机端还是安卓手机端

var u = navigator.userAgent; 
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android手机终端 
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios手机终端
posted @ 2020-01-15 15:32  huihuihero  阅读(287)  评论(0编辑  收藏  举报