如何判定是否手机访问自动跳转至电脑或者手机网站

<script>
var uaTest = /Android|webOS|Windows Phone|iPhone|ucweb|ucbrowser|iPod|BlackBerry/i.test(navigator.userAgent.toLowerCase());var touchTest = ‘ontouchend’ in document;if(uaTest && touchTest){window.location.href = ‘http://www.miaovv.com’;}
</script>

如何判定是否手机访问自动跳转至电脑或者手机网站

本站部分文章、资源来自互联网,版权归原作者及网站所有,如果侵犯了您的权利,请及时联系我站删除。邮箱:1103606138#qq.com

站点地图