js判断PC端还是手机端


if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { window.location.href = "手机版网址"; } else { window.location.href = "PC端网址"; }
 
posted @ 2018-03-27 17:11  羽*枫  阅读(416)  评论(0编辑  收藏  举报