使用device.js检测设备并实现不同设备展示不同网页 html代码: <!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <script src="device.js"></script> </head> <body style="margin: auto…
$(function () { var u = navigator.userAgent, app = navigator.appVersion; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g //要先判断当前是什么系统,否则会报错,无法执行语句 if (isAndroid) { console.log(isAndroid); }else{ if (navigator.userAgent.mat…
/// <summary> /// 判断手机用户UserAgent /// </summary> /// <returns></returns> private bool IsMobile() {          HttpContext context = HttpContext.Current;     if (context != null)     {         HttpRequest request = context.Request;   …
function isPhone(){ var u = navigator.userAgent, app = navigator.appVersion; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 var isIphoneX = /iphone/gi.test(na…
启明星手机版会议室预定系统 V1.0发布 在手机里输入 http://www.dotnetcms.org/e4.apk 或者扫描二维码下载 用户打开系统,可以实时查看所有会议室状态 点击会议室名称,可以查看当天会议列表 并可以查看预订人的联系电话,邮件等 我们推荐预定系统放到公网上,如果在企业内部网站,因为很多企业通过WIFI连接,所以在公司内仍可使用本系统. 但是,如果在家会无法连接到服务器 请注意,员工通讯录使用了缓存,这样的优点是即使断网仍可以查看员工信息,缺点是用户信息可能不会实时更新.…
$(document).ready(function () { var browser = { versions: function () { var u = navigator.userAgent, app = navigator.appVersion; return { //移动终端浏览器版本信息 ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端 android: u.indexOf('Android') > -1 || u.i…
我们可以在网站的首页加上一段JavaScript代码对用户的浏览器进行判断,从而显示不同的网址,代码如下: <script type="text/javascript"> if (window.location.toString().indexOf('pref=padindex') != -1) {} else { if (/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|S…
PHP判断手机还是电脑 <?php $is_mobile = (is_mobile() == true) ? "手机" : "电脑"; echo '<label>php判断结果:</label><span class="red">' . $is_mobile . '</span>'; ?> function is_mobile() { $user_agent = $_SERVER['HT…
随着 Genymotion.BlueStacks 等电脑上的 Android 模拟器流行起来之后,似乎很多人都发现在电脑上运行使用安卓APP软件.畅玩手机游戏确实很有乐趣. 今天我们又发现了一款全新免费的 Android 模拟器——Andy!官方表示 Andy 将支持 Windows.Mac 以及 Linux (目前仅发布了Win版).模拟器的使用效果基本上和前两者一样,都可以比较流畅地在电脑上运行安卓应用程序.而 Andy 有特色的地方是提供了远程控制功能,可以在 Android 手机/平板上…
在页面代码中加入以下js,即可利用JavaScript判断是否是手机mobile登录! <script type="text/javascript" src="${contextPath }/js/uaredirect.js"></script> <script type="text/javascript" type="text/javascript">uaredirect("ht…