检测手机跳转链接
<script type="text/javascript">
function isMobile() {
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))) {
return true;
} else {
return false;
}
}
var urlMobile = '链接'; //手机跳转的页面
if(isMobile() !== false)
window.location.href = urlMobile;
</script>