//js判断当前移动设备平台 var isiOs = false; var isAndroid = false; var isWindowsPhone = false; if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { isiOS = true; } else if(/(Android)/i.test(navigator.userAgent)) { isAndroid = true; } else if(/(Windows Phone)/i.test(navigator.userAgent)) { isWindowsPhone = true; }