实现PC端和移动端的界面切换
<script> if((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { window.location.href = "m/index.html" //跳转到手机 }else{ window.location.href=""; //跳转到电脑 }
</script>