/*判断当前设备是平板.安卓.苹果设备*/ <script type="text/javascript"> function fBrowserRedirect(){ var sUserAgent = navigator.userAgent.toLowerCase(); alert(sUserAgent); //获取浏览器和手机的信息 //匹配信息里的关键字 var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"…
/** * [isMobile 判断平台] * @param test: 0:iPhone 1:Android */ function ismobile(test){ var u = navigator.userAgent, app = navigator.appVersion; if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD…
非常实用的js判断手机端操作系统(Andorid/IOS),并自动跳转相应下载界面 androidURL = "http://xxx/xxx.apk"; var browser = { versions: function() { var u = navigator.userAgent, app = navigator.appVersion; return { android: u.indexOf('Android') > -1 || u.indexOf('Linux') >…
//判断手机端操作系统(Andorid/IOS),并自动跳转相应下载界面 androidURL ="http://xxx/xxx.apk"; var browser = { versions: function() { var u = navigator.userAgent, app = navigator.appVersion; return { android: u.indexOf("Android") > -1 || u.indexOf("Li…
if (window.location.toString().indexOf('pref=padindex') != -1) { } else { if (/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amo…
方法一(网页上判断) if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {   var loadDateTime = new Date();   window.setTimeout(function() {    var timeOutDateTime = new Date();    if (timeOutDateTime - loadDateTime < 5000) {     window.location = "要跳转的…
var topValue = 0,// 上次滚动条到顶部的距离 interval = null;// 定时器 contactsList = document.getElementById("contactsList"); contactsList.onscroll = function() { //我项目中的contactsList滚动 if(interval == null) {// 未发起时,启动定时器,1秒1执行 interval = setInterval(function (…
<script type="text/javascript"> $(document).ready(function(e) { var u = navigator.userAgent, app = navigator.appVersion; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器 var isiOS = !!u.match(/…
<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)…
var browser = { versions: function() { var u = navigator.userAgent, app = navigator.appVersion; return {//移动终端浏览器版本信息 trident: u.indexOf(, //IE内核 presto: u.indexOf(, //opera内核 webKit: u.indexOf(, //苹果.谷歌内核 gecko: u.indexOf( && u.indexOf(, //火狐内核 m…