<head>
<script type="text/javascript">
<!--
var type = navigator.appName
var lang;
if (type=="Netscape")
    lang = navigator.language
else
    lang = navigator.userLanguage

// 국가코드에서 앞 2글자만 자름함
var lang = lang.substr(0,2)

// 한글인 경우 도메인1으로 이동
if (lang == "ko")
    window.location.replace('http://www.도메인1.com')
// 다른 언어인 경우 도메인2로 이동

else
    window.location.replace('http://www.도메인2.com')

//-->
</script>
</head>

'TECHNOLOGY > JavaScript' 카테고리의 다른 글

자바스크립트 브라우저 정보확인  (0) 2013.07.31

+ Recent posts