• <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
  • <th id="l3qpx"><progress id="l3qpx"></progress></th>
      <th id="l3qpx"></th>
      <dd id="l3qpx"><font id="l3qpx"></font></dd>
      <th id="l3qpx"></th>
      0712-2888027 189-8648-0214
      微信公眾號

      孝感風信網(wǎng)絡(luò)科技有限公司微信公眾號

      當前位置:主頁 > 技術(shù)支持 > Javascript/JQuery > 判斷常用手機端并跳轉(zhuǎn)至移動網(wǎng)站的JavaScript代碼

      判斷常用手機端并跳轉(zhuǎn)至移動網(wǎng)站的JavaScript代碼

      時間:2017-08-03來源:風信官網(wǎng) 點擊: 1482次
      以下為一段JavaScript代碼,用于判斷移動端瀏覽器的訪問,并跳轉(zhuǎn)到相應的移動端網(wǎng)站,可判斷"iphone", "ipod", "ipad", "android", "mobile", "blackberry", "webos", "incognito", "webmate", "bada", "nokia", "lg", "ucweb", "skyfire"這些設(shè)備。

      JavaScript代碼如下:
      <script type="text/javascript">
      var mobileAgent = new Array("iphone", "ipod", "ipad", "android", "mobile", "blackberry", "webos", "incognito", "webmate", "bada", "nokia", "lg", "ucweb", "skyfire");
      var browser = navigator.userAgent.toLowerCase();
      var isMobile = false;
      for (var i=0; i<mobileAgent.length; i++){
        if (browser.indexOf(mobileAgent[i])!=-1){
          isMobile = true;
          location.href = 'http://m.ithov.net';
          break;
        }
      }
      </script>
      
      
      熱門關(guān)鍵詞: 手機端 移動網(wǎng)站 JavaScript代碼
      欄目列表
      推薦內(nèi)容
      熱點內(nèi)容
      展開
      欧美一区二区三区免费A级视频,亚洲精品中文字幕综合,动漫精品中文字幕无码第一页,1024亚洲国产综合 亚太影院 柯西贝尔-游戏赚网
    1. <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
    2. <th id="l3qpx"><progress id="l3qpx"></progress></th>
        <th id="l3qpx"></th>
        <dd id="l3qpx"><font id="l3qpx"></font></dd>
        <th id="l3qpx"></th>