判断是否为PC
来源:http://blog.csdn.net/seven1276/article/details/8211877
function IsPC() { var userAgentInfo = navigator.userAgent; var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"); var flag = true; for (var v = 0; v < Agents.length; v++) { if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; } } return flag; }
JS 一些功能代码块[如判断设备]
时间: 2024-10-06 05:40:21