<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)) {
alert("移动:Android|webOS|iPhone|iPod|BlackBerry");
} else if (/iPad/i.test(navigator.userAgent)) {
alert("移动:iPad");
} else {
alert("移动:其它");
}
} catch (e) {
}
}
}
else {
alert("PC");
}
</script>
判断浏览器来自移动端或PC
最新推荐文章于 2023-07-04 08:43:16 发布