<script type="text/javascript">(function() { //得到域名后綴 var path = location.pathname.split('/') ...
lt 判斷瀏覽器是否為手機端 gt lt script gt class function navigator var userAgent navigator.userAgent documentElement document.documentElement if userAgent.match micromessenger gi documentElement.className mobil ...
2016-09-19 15:17 0 1516 推薦指數:
<script type="text/javascript">(function() { //得到域名后綴 var path = location.pathname.split('/') ...
;}----------其中mobile為手機端的路徑標識, 可以自定義修改. ...
<script>function uaredirect(murl){ try { if(document.getElementById("bdmark") != null){ return ...
DEMO 1 DEMO 2 DEMO 3 ...
下面前端代碼可以判斷用戶那個終端打開頁面,實現跳轉 if((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC ...
一、PC端跳轉到移動端 html頁面: mobile.js文件: 二、移動端跳轉到PC端 html頁面: pc.js文件: ...
有時接觸一些手機上的適應,需要知道是pc 還是移動端 function IsPC() { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS ...