W
e
l
c
o
m
e
: )

JS navigator.userAgent

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 @ 2018-12-25 09:57  fastKapi  阅读(1234)  评论(0编辑  收藏  举报