var u = navigator.userAgent, app = navigator.appVersion;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
var systemFlag = "";
//要先判断当前是什么系统,否则会报错,无法执行语句
if (isAndroid) {
systemFlag = "android";
} else {
systemFlag = "ios";
}
网友评论