标签:js
var UA = function(){
var userAgent = navigator.userAgent.toLowerCase();
return {
ipad: /ipad/.test(userAgent),
iphone: /iphone/.test(userAgent),
android: /android/.test(userAgent),
weixin: /micromessenger/.test(userAgent),
qqnews_version: userAgent.match(/qqnews/i) == "qqnews" ? userAgent.split(‘qqnews/‘)[1] : ‘‘
};
}本文出自 “让希望不再失望!” 博客,请务必保留此出处http://peterz2011.blog.51cto.com/3186140/1600611
标签:js
原文地址:http://peterz2011.blog.51cto.com/3186140/1600611