//判断手机终端
if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
window.location.href = 'mobile.html'
}
//判断手机终端
if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
window.location.href = 'mobile.html'
}
转载于:https://www.cnblogs.com/xiaomingSun/p/7047252.html