当访问网站URL网址时,Js判断是跳转PC和Wap模板。
<script type="text/javascript"> try { var urlhash = window.location.hash; if (!urlhash.match("fromapp")) { if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))) { window.location = "http://你的网站/"; } } } catch (error) { } </script>新手学习,努力就好。^(* ̄(oo) ̄)^
[PHP学习]Js判断跳转PC还是Wap端网站方法
最新推荐文章于 2021-03-13 03:52:27 发布