웹브라우저 종류별 X-Y좌표 보정하기 > 기술자료 | 해피정닷컴

웹브라우저 종류별 X-Y좌표 보정하기 > 기술자료

본문 바로가기

사이트 내 전체검색

웹브라우저 종류별 X-Y좌표 보정하기 > 기술자료

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
%>

댓글목록

등록된 댓글이 없습니다.


Total 2,636건 53 페이지
  • RSS
기술자료 목록
1596
영카트   12888  2014-09-29 18:25  
1595
영카트   14543  2014-09-29 17:32 ~ 2014-10-28 00:00  
1594
MSSQL   23711  2014-09-29 11:28  
1593
HTML   15876  2014-09-28 23:45  
1592
HTML   13502  2014-09-28 23:28  
1591
JavaScript   19363  2014-09-27 08:32  
열람
ClassicASP   12491  2014-09-26 01:08 ~ 2018-12-01 22:51  
1589
그누보드   12360  2014-09-25 16:34  
1588
PHP   13099  2014-09-25 15:58 ~ 2018-09-26 14:52  
1587
JavaScript   13825  2014-09-25 14:32  
1586
그누보드   12388  2014-09-20 22:19  
1585
영카트   13078  2014-09-16 10:23  
1584
PHP   36931  2014-09-13 13:02 ~ 2022-09-26 20:44  
1583
영카트   15485  2014-09-05 22:06 ~ 2015-05-08 00:00  
1582
영카트   17825  2014-09-05 18:18  
1581
영카트   372798  2014-08-30 00:07  
1580
JavaScript   24977  2014-08-29 01:06 ~ 2016-08-04 00:00  
1579
그누보드   12312  2014-08-28 15:36  
1578
그누보드   13831  2014-08-23 19:55  
1577
그누보드   68359  2014-08-20 11:50 ~ 2022-11-22 16:25  

검색

해피정닷컴 정보

회사소개 회사연혁 협력사 오시는길 서비스 이용약관 개인정보 처리방침

회사명: 해피정닷컴   대표: 정창용   전화: 070-7600-3500   팩스: 042-670-8272
주소: (34368) 대전시 대덕구 대화로 160 대전산업용재유통단지 1동 222호
개인정보보호책임자: 정창용   사업자번호: 119-05-36414
통신판매업신고: 제2024-대전대덕-0405호 [사업자등록확인]  
Copyright 2001~2025 해피정닷컴. All Rights Reserved.