摘要: var ua = navigator.userAgent.toLowerCase();//获取判断用的对象if (ua.match(/Mobile/i) == "mobile") { console.log(ua) //判断是否是移动设备打开。browser代码在下面 if (ua.match(/M 阅读全文