var win;
if(window.clientInformation.systemLanguage)
win= window.clientInformation.systemLanguage;
else
win = window.navigator.language;
if (win.substring(0,3)=="zh-") {
window.navigate("index_cn.html"); //轉向中文網頁
}else{
window.navigate("en/index.html"); //轉向英文網頁
}
</script>
firefox出错:
window.clientInformation has no properties请帮我再看一下,谢谢。
if (navigator.appName == 'Netscape')
var language = navigator.language;
else
var language = navigator.browserLanguage
if (language.substring(0,3)=="zh-"){
location.href="index_cn.html"; //轉向中文網頁
}else{
location.href="en/index.html"; //轉向英文網頁
}
</script>
if (navigator.language)
var language = navigator.language;
else
var language = navigator.browserLanguage;
if (language.substring(0,3)=="zh-"){
location.href="index_cn.html"; //轉向中文網頁
}else{
location.href="en/index.html"; //轉向英文網頁
}
</script>
这样也可以
<head>
<script>var win;
if(window.clientInformation)
win= window.clientInformation.systemLanguage;
else
win = window.navigator.language;
if (win.substring(0,3)=="zh-") {
location.href="index_cn.html"; //轉向中文網頁
}else{
location.href="en/index.html"; //轉向英文網頁 }
</script>
</head>
<body>
</body>
</html>
不好意思