ClassicASP 웹브라우저 종류별 X-Y좌표 보정하기
페이지 정보
본문
<%
'클라이언트 브라우저 환경 감지
dim strUserAgent ' 브라우저 타입
strUserAgent = UCase(cstr(request.ServerVariables("HTTP_USER_AGENT")))
dim IE
dim IE6
dim IE7
dim IE8
dim IE9
dim IE10
dim IE11
dim Opera
dim Opera5
dim ChromeSafari
dim Chrome
dim Safari
dim Firefox
dim Android
dim OtherBrowser
IE = FALSE
IE6 = FALSE
IE7 = FALSE
IE8 = FALSE
IE9 = FALSE
IE10 = FALSE
IE11 = FALSE
if InStr(strUserAgent, "MSIE 6") then
IE = TRUE
IE6 = TRUE
elseif InStr(strUserAgent, "MSIE 7") then
IE = TRUE
IE7 = TRUE
elseif InStr(strUserAgent, "MSIE 8") then
IE = TRUE
IE8 = TRUE
elseif InStr(strUserAgent, "MSIE 9") then
IE = TRUE
IE9 = TRUE
elseif InStr(strUserAgent, "MSIE 10") then
IE = TRUE
IE10 = TRUE
elseif InStr(strUserAgent, "v:11") then
IE = TRUE
IE11 = TRUE
elseif InStr(strUserAgent, "RV:11") then
IE = TRUE
IE11 = TRUE
end if
Opera = FALSE
Opera5 = FALSE
If InStr(strUserAgent, "Opera") or InStr(strUserAgent, "OPERA") or InStr(strUserAgent, "OPR") then
Opera = TRUE
end If
If InStr(strUserAgent, "Opera 5") _
or InStr(strUserAgent, "Opera/5") then
Opera5 = TRUE
end If
Firefox = FALSE
If InStr(strUserAgent, "Firefox") or InStr(strUserAgent, "FIREFOX") then
Firefox = TRUE
end If
Android = FALSE
If InStr(strUserAgent, "Mobile Safari") or InStr(strUserAgent, "ANDROID") then
Android = TRUE
end If
Chrome = FALSE
If InStr(strUserAgent, "Chrome") then
Chrome = TRUE
end If
Safari = FALSE
If InStr(strUserAgent, "Safari") or InStr(strUserAgent, "SAFARI") then
Safari = TRUE
end If
%>
<%
' X좌표 보정하기
dim hp_xlayer
hp_xlayer = "0" ' IE11
if IE6 then
hp_xlayer = hp_xlayer - 475
elseIf IE7 then
hp_xlayer = hp_xlayer + 0
elseIf IE8 then
hp_xlayer = hp_xlayer + 0
elseIf IE9 then
hp_xlayer = hp_xlayer + 0
elseIf IE10 then
hp_xlayer = hp_xlayer + 0
elseIf IE11 then
hp_xlayer = hp_xlayer + 0
elseIf Chrome then
hp_xlayer = hp_xlayer + 0
elseIf Android then
hp_xlayer = hp_xlayer - 50
elseIf Safari then
hp_xlayer = hp_xlayer + 0
elseif Firefox then
hp_xlayer = hp_xlayer - 0
else
hp_xlayer = hp_xlayer - 0
end if
response.write hp_xlayer
%>
<%
'Y좌표 보정하기
dim hp_ylayer
hp_ylayer = "15" ' IE11
if IE6 then
hp_ylayer = hp_ylayer + 0
elseIf IE7 then
hp_ylayer = hp_ylayer + 0
elseIf IE8 then
hp_ylayer = hp_ylayer + 3
elseIf IE9 then
hp_ylayer = hp_ylayer + 3
elseIf IE10 then
hp_ylayer = hp_ylayer + 3
elseIf IE11 then
hp_ylayer = hp_ylayer + 0
elseIf Chrome then
hp_ylayer = hp_ylayer - 0
elseIf Android then
hp_ylayer = hp_ylayer - 0
elseIf Safari then
hp_ylayer = hp_ylayer - 0
elseif Firefox then
hp_ylayer = hp_ylayer - 0
else
hp_ylayer = hp_ylayer
end if
response.write hp_ylayer
%>
'클라이언트 브라우저 환경 감지
dim strUserAgent ' 브라우저 타입
strUserAgent = UCase(cstr(request.ServerVariables("HTTP_USER_AGENT")))
dim IE
dim IE6
dim IE7
dim IE8
dim IE9
dim IE10
dim IE11
dim Opera
dim Opera5
dim ChromeSafari
dim Chrome
dim Safari
dim Firefox
dim Android
dim OtherBrowser
IE = FALSE
IE6 = FALSE
IE7 = FALSE
IE8 = FALSE
IE9 = FALSE
IE10 = FALSE
IE11 = FALSE
if InStr(strUserAgent, "MSIE 6") then
IE = TRUE
IE6 = TRUE
elseif InStr(strUserAgent, "MSIE 7") then
IE = TRUE
IE7 = TRUE
elseif InStr(strUserAgent, "MSIE 8") then
IE = TRUE
IE8 = TRUE
elseif InStr(strUserAgent, "MSIE 9") then
IE = TRUE
IE9 = TRUE
elseif InStr(strUserAgent, "MSIE 10") then
IE = TRUE
IE10 = TRUE
elseif InStr(strUserAgent, "v:11") then
IE = TRUE
IE11 = TRUE
elseif InStr(strUserAgent, "RV:11") then
IE = TRUE
IE11 = TRUE
end if
Opera = FALSE
Opera5 = FALSE
If InStr(strUserAgent, "Opera") or InStr(strUserAgent, "OPERA") or InStr(strUserAgent, "OPR") then
Opera = TRUE
end If
If InStr(strUserAgent, "Opera 5") _
or InStr(strUserAgent, "Opera/5") then
Opera5 = TRUE
end If
Firefox = FALSE
If InStr(strUserAgent, "Firefox") or InStr(strUserAgent, "FIREFOX") then
Firefox = TRUE
end If
Android = FALSE
If InStr(strUserAgent, "Mobile Safari") or InStr(strUserAgent, "ANDROID") then
Android = TRUE
end If
Chrome = FALSE
If InStr(strUserAgent, "Chrome") then
Chrome = TRUE
end If
Safari = FALSE
If InStr(strUserAgent, "Safari") or InStr(strUserAgent, "SAFARI") then
Safari = TRUE
end If
%>
<%
' X좌표 보정하기
dim hp_xlayer
hp_xlayer = "0" ' IE11
if IE6 then
hp_xlayer = hp_xlayer - 475
elseIf IE7 then
hp_xlayer = hp_xlayer + 0
elseIf IE8 then
hp_xlayer = hp_xlayer + 0
elseIf IE9 then
hp_xlayer = hp_xlayer + 0
elseIf IE10 then
hp_xlayer = hp_xlayer + 0
elseIf IE11 then
hp_xlayer = hp_xlayer + 0
elseIf Chrome then
hp_xlayer = hp_xlayer + 0
elseIf Android then
hp_xlayer = hp_xlayer - 50
elseIf Safari then
hp_xlayer = hp_xlayer + 0
elseif Firefox then
hp_xlayer = hp_xlayer - 0
else
hp_xlayer = hp_xlayer - 0
end if
response.write hp_xlayer
%>
<%
'Y좌표 보정하기
dim hp_ylayer
hp_ylayer = "15" ' IE11
if IE6 then
hp_ylayer = hp_ylayer + 0
elseIf IE7 then
hp_ylayer = hp_ylayer + 0
elseIf IE8 then
hp_ylayer = hp_ylayer + 3
elseIf IE9 then
hp_ylayer = hp_ylayer + 3
elseIf IE10 then
hp_ylayer = hp_ylayer + 3
elseIf IE11 then
hp_ylayer = hp_ylayer + 0
elseIf Chrome then
hp_ylayer = hp_ylayer - 0
elseIf Android then
hp_ylayer = hp_ylayer - 0
elseIf Safari then
hp_ylayer = hp_ylayer - 0
elseif Firefox then
hp_ylayer = hp_ylayer - 0
else
hp_ylayer = hp_ylayer
end if
response.write hp_ylayer
%>
댓글목록
등록된 댓글이 없습니다.