function uaredirect(murl){ try { if(document.getElementById("bdmark") != null){ return; } var urlhash = window.location.hash; if (!urlhash.match("fromapp")){ if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))) { locatio
function is_weixn_qq() { var ua = navigator.userAgent.toLowerCase(); if (ua.match(/MicroMessenger/i) == "micromessenger") { alert("weixin"); } else if (ua.match(/QQ/i) == "qq") { alert("QQ"); } else if (ua.match(/ch
<?php public function is_mobile(){ // returns true if one of the specified mobile browsers is detected // 如果监测到是指定的浏览器之一则返回true $regex_match="/(nokia|iphone|android|motorola|^mot\-|softbank|foma|docomo|kddi|up\.browser|up\.link|"; $regex_matc
方法1: <script type="text/javascript"> var browser = { versions: function () { var u = navigator.userAgent, app = navigator.appVersion; return {//移动终端浏览器版本信息 trident: u.
1.媒体查询方法在 css 里面这样写 -------------------- @media screen and (min-width: 320px) and (max-width: 480px){在这里写小屏幕设备的样式} @media only screen and (min-width: 321px) and (max-width: 1024px){这里写宽度大于321px小于1024px的样式(一般是平板电脑)} @media only screen and (min-width: