ASP 해당 브라우져 알아내는 함수

ASP 해당 브라우져 알아내는 함수


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<%
Option Explicit
Dim strAgent, brow, browType, iVersion
strAgent = Request.ServerVariables("HTTP_USER_AGENT")
'브라우져 정보를 가져온다
Response.Write strAgent
If Instr(strAgent, "MSIE") then
brow = "인터넷 익스플로러"
iVersion = CInt(Mid(strAgent, InStr(strAgent, "MSIE") + 5, 1))
browType = "3 이하"
If iVersion>3 Then browType = "4 or 5 이상"
Else
If InStr(strAgent, "compatible;") = 0 And InStr(strAgent, "Opera") = 0 Then
brow = "넷스케이프"
iVersion = CInt(Mid(strAgent, InStr(strAgent, "/") + 1, 1))
browType = "3 이하"
If iVersion>3 Then browType = "4 이상"
End If
End If
Response.Write "<p><br>브라우저는 "&brow&"이며, 버전은 "&browType&" 입니다<p>"
if iVersion>3 then
Response.Write brow&"용 DHTML을 사용하실 수 있습니다"
End if
%>
Share