mirror of
https://github.com/WebStackPage/WebStackPage.github.io.git
synced 2026-02-07 20:33:52 +08:00
update
This commit is contained in:
18
language.js
Normal file
18
language.js
Normal file
@@ -0,0 +1,18 @@
|
||||
<script>
|
||||
|
||||
if (navigator.appName ==”Netscape”)
|
||||
|
||||
var language = navigator.language;
|
||||
|
||||
else
|
||||
|
||||
var language = navigator.browserLanguage;
|
||||
|
||||
if (language.indexOf(“en”) > -1) document.location.href = “en/index.html”;
|
||||
|
||||
else if (language.indexOf(“zh”) > -1) document.location.href =”cn/index.html”;
|
||||
|
||||
else
|
||||
|
||||
document.location.href =”en/index.html”;
|
||||
</script>
|
||||
Reference in New Issue
Block a user