标签:
String agent = request.getHeader("User-Agent").toLowerCase(); Pattern pattern = Pattern.compile("msie (\\d+)"); Matcher matcher = pattern.matcher(agent); if(matcher.find()){ int version = Integer.parseInt(matcher.group(1)); if(version < 9){ //IE9以下版本 } }
以上一判断lt IE9为例
标签:
原文地址:http://www.cnblogs.com/rubekid/p/4887189.html