pc站转手机站的首页(扫二维码)

  1. <script type="text/javascript">
  2. //判断是否为手机站,是则打开手机站的页面
  3. if(/Android|webOS|iPhone|iPod|BlackBerry|Windows CE|Windows Phone/i.test(navigator.userAgent)){
  4. if(window.location.href.indexOf("?pc")<0){try{window.location.href="http://www.qd-lib.com/index_wap3.aspx"}catch(e){}}
  5. }
  6. </script>
原文地址:https://www.cnblogs.com/ghfjj/p/6306306.html