js判断网页在手机端跳转到移动页面,script怎么写跳转移动端

阅读 147

2022-03-16

js判断网页在手机端跳转到移动页面,script怎么写跳转移动端

js案例:

<script>if(/Android|webOS|iPhone|Windows Phone|iPod|BlackBerry|SymbianOS/i.test(window.navigator.userAgent) && !window.location.hash.match("fromapp")){ window.location.href = "http://www.7iwan.com"; }</script>

精彩评论(0)

0 0 举报