移动端设备判断,简短够用
var isWebkit = /Webkit/i.test(navigator.userAgent), isChrome = /Chrome/i.test(navigator.userAgent), isMobile = !!("ontouchstart" in window), isAndroid = /Android/i.test(navigator.userAgent), isIE = document.documentMode;
移动端设备判断仍然简短判断的也挺全
js判断手机移动设备是Android平台还是ios平台
if (/android/i.test(navigator.userAgent)){ // todo : android} if (/ipad|iphone|mac/i.test(navigator.userAgent)){ // todo : ios}