判断移动设备访问自动跳转到移动版页面

UA判断,写js里面,页面加载时执行

if( /Android|webOS| iPhone | iPad | iPod |BlackBerry|opera mini|opera mobile|appleWebkit.*mobile|mobile/i.test(navigator.userAgent) ) {
window.location = 'wap.html';
}
原文地址:https://www.cnblogs.com/shenyixin/p/3747181.html