Detect Mobile Browsers

授权协议 未知
开发语言 Java PHP Perl Python Ruby ASP JavaScript
所属分类 程序开发、 其他开发相关
软件类型 开源软件
地区 国产
投 递 者 呼延运恒
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

一个国外的开源手机终端设备检测的代码集项目,支持的语言(或软件)主要有:Apache/ASP/ASP.NET/ColdFusion/C#/IIS/JSP/JavaScript/jQuery/Lasso/nginx/node.js/PHP/Perl/Python/Rails 


 

  • /// <summary> /// 檢測手機客戶端 HttpCapabilitiesBase.IsMobileDevice /// .NET 4.5 /// 塗聚文注 /// </summary> public static class HttpRequestBaseExtensions { #region Private Fiel

  • Usage Browser <script src="mobile-detect.js"></script> <script> var md = new MobileDetect(window.navigator.userAgent); // ... see below </script> Node.js / Express var MobileDetect = require

  • composer require hisorange/browser-detect Yep, that's it! At least for lavarel 5.5 and above, for 5.4 and below please read the extended installation. How to use In your classes and controllers just c

  •  IE       只有IE支持创建ActiveX控件,因此她有一个其他浏览器没有的东西,就是ActiveXObject函数。只要判断window对象存在ActiveXObject函数,就可以明确判断出当前浏览器是IE。而IE各个版本典型的userAgent如下:         Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)        

  • http://detectmobilebrowsers.com/ java: public static boolean isMobileAccess(HttpServletRequest request){ String ua=request.getHeader("User-Agent").toLowerCase(); if(ua.matches("(?i).*((android|bb

  • Using Regex (from detectmobilebrowsers.com): Here's a function that uses an insanely long and comprehensive regex which returns a true or false value depending on whether or not the user is browsing w