判断区分安卓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-08 09:29  Angiy  阅读(182)  评论(1编辑  收藏  举报