js判断是IOS还是安卓终端
var ua = navigator.userAgent;var isAndroid = ua.indexOf("Android") > -1 || ua.indexOf("Adr") > -1; //gvar isiOS = !!ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
·
var ua = navigator.userAgent;
var isAndroid = ua.indexOf("Android") > -1 || ua.indexOf("Adr") > -1; //g
var isiOS = !!ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
更多推荐
已为社区贡献1条内容
所有评论(0)