这篇文章主要介绍了jsp中通过agent判断浏览器版本的示例,大家参考使用吧
代码如下:public static String getBrowser(String userAgent) { if(userAgent==null||userAgent.trim().length()<1){ return "unknow "; } String[]brorserEN=new String[]{ "MyIE2", "Firefox", "KuGooSoft", "LBBROWSER", "TheWord", "QQ", "Maxthon", "BIDUPlayerBrowser", "Opera", "Chrome", "Safari", "9A334", "UCWEB", "googlebot", "rv 11.0"};新闻热点
疑难解答