<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 ...