//判断手机终端 if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) { window.location.href = 'mobile.html' }