由于微信旧版本仍然在使用,旧版本的微信jssdk 与新版的有所区别,需要判断版本号 采用不同的js api
在网上查了一下 ,比较好的版本判断方法有两种:
1. 采用js判断
var wechatInfo = navigator.userAgent.match(/MicroMessenger\/([\d\.]+)/i) ;
if( !wechatInfo ) {
aler...
分类:
微信 时间:
2015-04-07 13:53:51
阅读次数:
272
function getClientHeight(){ //可见高 var clientHeight=document.body.clientHeight;//其它浏览器默认值 if(navigator.userAgent.indexOf("MSIE 6.0")!=-1) {...
分类:
Web程序 时间:
2015-04-01 16:53:10
阅读次数:
142
function isMobile(){ var sUserAgent= navigator.userAgent.toLowerCase(), bIsIpad= sUserAgent.match(/ipad/i) == "ipad", bIsIphoneOs= sUserAgent.ma...
分类:
移动开发 时间:
2015-03-31 17:41:02
阅读次数:
190
<scripttype="text/javascript">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-|Amoi|ZTE/.test(navigator.userAgent))){if(window.loc..
分类:
移动开发 时间:
2015-03-31 13:01:50
阅读次数:
183
//判断是否移动端 function isPhone() { var ua = navigator.userAgent.toLowerCase(), Agents = ["android", "iphone", "symbianos", "win...
分类:
移动开发 时间:
2015-03-30 12:55:49
阅读次数:
184
var explorer = window.navigator.userAgent; if (explorer.indexOf("MSIE") >= 0) { alert('IE'); } else if (explorer.indexOf("Firefox") >= 0)...
分类:
Web程序 时间:
2015-03-18 12:06:18
阅读次数:
129
//判断浏览器版本function CheckBrowser() { var sys = {}; var ua = navigator.userAgent.toLowerCase(); if (ua.match(/msie/) != null || ua.match(/tr...
分类:
其他好文 时间:
2015-03-17 17:48:12
阅读次数:
252
1、第一种:复制代码代码如下:function IsPC() { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iP...
分类:
Web程序 时间:
2015-03-17 13:59:46
阅读次数:
165
一 判断移动终端类型1. 判断是否是IE浏览系统 isIE: function() { return (/msie/i).test(navigator.userAgent);}2. 判断是否是Android浏览系统isAndroid: function() { var isAndr...
分类:
Web程序 时间:
2015-03-16 14:25:41
阅读次数:
125
在BT终端中输入:sudo apt-get install firefox 按回车在火狐地址栏里输入"about:config" 回车,点我同意.然后在过滤器里输入"general.useragent.locale",双击该项然后再弹出的对话框里输入"zh-CN",确定,在火狐地址栏输入:htt.....
分类:
其他好文 时间:
2015-03-13 15:48:42
阅读次数:
119