标签:
1 function versions(){ 2 var a = navigator.userAgent; 3 return navigator.appVersion, { 4 trident: a.indexOf("Trident") > -1, 5 presto: a.indexOf("Presto") > -1, 6 webKit: a.indexOf("AppleWebKit") > -1, 7 gecko: a.indexOf("Gecko") > -1 && -1 == a.indexOf("KHTML"), 8 ios: !!a.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), 9 android: a.indexOf("Android") > -1 || a.indexOf("Linux") > -1, 10 iPhone: a.indexOf("iPhone") > -1, 11 iPad: a.indexOf("iPad") > -1, 12 webApp: -1 == a.indexOf("Safari") 13 }
标签:
原文地址:http://www.cnblogs.com/tomastong/p/4195344.html