JS判断用户手机是IOS还是Android
$(function () { var u = navigator.userAgent, app = navigator.appVersion; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 if (isAndroid) { alert("安卓机!") } if (isIOS) { alert("苹果果机!") } });
侵删 联系614506425@qq.com