标签:
let isMobile = function(){ let userAgentInfo = navigator.userAgent; let Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod") let flag = false; for (let v = 0; v < Agents.length; v++) { if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = true; break; } }; return flag; }();
标签:
原文地址:http://www.cnblogs.com/CyLee/p/5922639.html