랭귀지/ASP
[ASP] 모바일인지 pc인체 체크하기
유키공
2021. 10. 8. 11:21
- 모바일인지 pc인체 체크하기
'모바일인지 pc인지 체크하기 Function isItMobile() Dim chk chk = False mob = "iPod|iPhone|Android|BlackBerry|SymbianOS|SCH-M\d+|Opera Mini|Windows CE|Nokia|SonyEricsson|webOS|PalmOS" splitmo = split(mob,"|") agent = Request.ServerVariables("HTTP_USER_AGENT") For i = 0 to UBound(splitmo ) If InStr(agent,splitmo (i)) > 0 Then chk = True Exit For End If Next isItMobile = chk End Function If isItMobile() = False Then response.write "PC" Else response.write "MOBILE" End If