检测浏览器类型
2007-12-23 12:36:02 来源:WEB开发网核心提示:<%@ taglib uri="http://Java.sun.com/jstl/core" prefix="c" %><%@ taglib uri="http://java.sun.com/jstl/core" PRefix="c
<%@ taglib uri="http://Java.sun.com/jstl/core" prefix="c" %><%@ taglib uri="http://java.sun.com/jstl/core" PRefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/core-rt" prefix="c-rt" %>
<Html>
<head>
<title>Check Browser</title>
</head>
<body>
<c-rt:choose>
<c-rt:when test="<%=request.getHeader(\"User-Agent\").indexOf(\"MSIE\")!=-1%>">
You are using Internet EXPlorer
</c-rt:when>
<c-rt:otherwise>
You are using Netscape, or some other browser....
</c-rt:otherwise>
</c-rt:choose>
</body>
</html>
<%@ taglib uri="http://java.sun.com/jstl/core-rt" prefix="c-rt" %>
<Html>
<head>
<title>Check Browser</title>
</head>
<body>
<c-rt:choose>
<c-rt:when test="<%=request.getHeader(\"User-Agent\").indexOf(\"MSIE\")!=-1%>">
You are using Internet EXPlorer
</c-rt:when>
<c-rt:otherwise>
You are using Netscape, or some other browser....
</c-rt:otherwise>
</c-rt:choose>
</body>
</html>
(出处:http://www.cncms.com)
更多精彩
赞助商链接