Mobile phone tablet and other mobile terminal adaptation jump URL js code
-
2020-03-30 01:28:56
-
OfStack
<script type="text/javascript">
if(/AppleWebKit.*mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){
if(window.location.href.indexOf("?mobile")<0){
try{
if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){
window.location.href=" Mobile page ";
}else if(/iPad/i.test(navigator.userAgent)){
window.location.href=" Tablet page ";
}else{
window.location.href=" Other mobile pages "
}
}catch(e){}
}
}
</script>