000-js判断电脑或手机登录】的更多相关文章

<script type="text/javascript"> try{ if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){ window.location.href="mindex.html"; }else{ window.location.href="cindex.html"; } }catch(e){} </script>…
<script type="text/javascript"> try{ if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){ window.location.href="mindex.html"; }else{ window.location.href="cindex.html"; } }catch(e){} </script>…
protected void Page_Load(object sender, EventArgs e) { MobileHandle(); } 页面加载时候判断是否为手机登录 protected void MobileHandle() { string mobilePath = PublicFunction.GetConfigValue("MobilePath");//手机页面的路径 if (!string.IsNullOrEmpty(mobilePath)) { bool isMo…
JS判断手机浏览器 判断原理: JavaScript是前端开发的主要语言,我们可以通过 编写JavaScript程序来判断浏览器的类型及版本.JavaScript判断浏览器类型一般有两种办法,一种是根据各种浏览器独有的属性来分辨,另 一种是通过分析浏览器的userAgent属性来判断的.在许多情况下,值判断出浏览器类型之后,还需判断浏览器版本才能处理兼容性问题,而判断浏览器的 版本一般只能通过分析浏览器的userAgent才能知道. 浏览器类型 ⑴浏览器特有属性 ⑵根据userAgent 浏览器…
JavaScript判断浏览器类型一般有两种办法,一种是根据各种浏览器独有的属性来分辨,另一种是通过分析浏览器的userAgent属性来判断的.在许多情况下,值判断出浏览器类型之后,还需判断浏览器版本才能处理兼容性问题,而判断浏览器的版本一般只能通过分析浏览器的userAgent才能知道. 根据userAgent判断是否为手机访问   C# 代码   复制 function checkBrowser(){ var browser={ versions:function(){ var u = na…
$(function(){ function browserRedirect() { var sUserAgent= navigator.userAgent.toLowerCase(); var bIsIpad= sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs= sUserAgent.match(/iphone os/i) == "iphone os"; var bIsMidp= sUserAgent.mat…
转载自:http://www.jb51.net/article/48939.htm Javascript 判断客户端是否为 PC 还是手持设备,有时候项目中需要用到,很方便的检测,源生的哦,方法一共有两种 1.第一种: function IsPC() { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS", "Wi…
<script type="text/javascript"> function browserRedirect() { var sUserAgent= navigator.userAgent.toLowerCase(); var bIsIpad= sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs= sUserAgent.match(/iphone os/i) == "iphone os&…
<script language="javascript">window.onload = function () {alert("1");var u = navigator.userAgent;if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {//安卓手机alert("安卓手机");// window.location.href = "mobi…
var browserName_ = navigator.userAgent ; &&browserName_.indexOf(&&browserName_.indexOf(){ ){ ||browserName_.indexOf(){ location.href="http://xxx.xxx.com/"; } } else{ location.href="http://xxx.xxx.com/"; } }…