js判断是否是手机端
2016-04-28 Js 803
//手机
function IsMobile() {
var userAgentInfo = navigator.userAgent;
var Agents = [\"Android\", \"iPhone\", \"SymbianOS\", \"Windows Phone\", \"iPad\", \"iPod\"];
var vIs = false;
for (var i =
//手机 function IsMobile() { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; var vIs = false; for (var i = 0; i < Agents.length; i++) { if (userAgentInfo.indexOf(Agents[i]) > 0) { vIs = true; break; } } return vIs; }
很赞哦! (0)
文章评论
-
-
-
0条评论