This commit is contained in:
Viggo
2017-12-20 13:52:38 +08:00
parent 3d4132c40f
commit 0f785b32c6

View File

@@ -5,25 +5,18 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Document</title> <title>Document</title>
<script> <script>
if (navigator.appName == "Netscape"){ if (navigator.appName == "Netscape") {
var language = navigator.language; var language = navigator.language;
} } else {
else{
var language = navigator.browserLanguage; var language = navigator.browserLanguage;
} }
if (language.indexOf(en) > -1) { if (language.indexOf("en") > -1) {
document.location.href = "en/index.html"; document.location.href = "en/index.html";
} } else if (language.indexOf("zh") > -1) {
else if (language.indexOf(zh) > -1){
document.location.href = "cn/index.html"; document.location.href = "cn/index.html";
} } else {
else{
document.location.href = "en/index.html"; document.location.href = "en/index.html";
} }