반응형
<script type="text/javascript">
var ua = window.navigator.userAgent.toLowerCase();
if(/Android/.test(ua)||/iphone/.test(ua)
||/iPod/.test(ua)||/PPC/.test(ua)) {
document.location.replace('이동할경로');
}
</script>
<%
String browser = request.getHeader("User-Agent"); boolean result = false; if (browser.indexOf("Android") >0) { // 안드로이드 result = true; } else if (browser.indexOf("iphone","iPod","PPC") > 0) { // 아이폰등등.. result = true; } if (result == true) { response.sendRedirect("이동할경로"); } %>
<script type="text/javascript">
var ua = window.navigator.userAgent.toLowerCase();
if ( /iphone/.test(ua) || /android/.test(ua)
|| /opera/.test(ua) || /bada/.test(ua) ) {
document.location.replace('이동할경로');
}
</script>
<%
mobrwz = "Android|iPhone|iPod|IEMobile|Mobile|lgtelecom|PPC"
spmobrwz = split(spmobrwz,"|"
agent = Request.ServerVariables("HTTP_USER_AGENT")
For i = 0 to UBound(spmobrwz)
If InStr(agent,spmobrwz(i)) > 0 Then
Response.Redirect("이동할경로")
Exit for
End If
Next
%>
728x90
반응형
BIG
'Programming > Web' 카테고리의 다른 글
| 블로그에 구글맵 삽입하기/Google Map (0) | 2012.02.09 |
|---|---|
| JavaScript, jQuery, AJAX 강좌 모음 (0) | 2012.01.16 |
| 실전 HTML5 가이드 / 실전 웹표준 가이드 (0) | 2011.11.04 |
| Ajax 깜빡임 없는 refresh coding (0) | 2011.04.04 |
| Ajax를 이용한 화면 깜빡임없는 refresh 함수 (1) | 2011.03.13 |
댓글