//判断是否为手机环境
var devices = ["iPhone","Android","Windows Phone"]
var ua = window.navigator.userAgent
for (var i = 0; i < devices.length; i++) {
if (ua.indexOf(devices[i]) != -1) {
window.location.href = 'http:/**********/' //要跳转的网址
return
}
}
网页判断当前设备环境是否是移动端
最新推荐文章于 2024-03-28 17:14:00 发布