js 判断浏览器使用的语言
来源:互联网 发布:互联网传输数据 编辑:程序博客网 时间:2024/05/16 03:07
<script type="text/javascript">
var language = navigator.browserLanguage?navigator.browserLanguage:navigator.language;
alert(language);
if (language.indexOf('en') > -1) document.location.href = 'english.htm';
else if (language.indexOf('nl') > -1) document.location.href = 'dutch.htm';
else if (language.indexOf('fr') > -1) document.location.href = 'french.htm';
else if (language.indexOf('de') > -1) document.location.href = 'german.htm';
else if (language.indexOf('ja') > -1) document.location.href = 'japanese.htm';
else if (language.indexOf('it') > -1) document.location.href = 'italian.htm';
else if (language.indexOf('pt') > -1) document.location.href = 'portuguese.htm';
else if (language.indexOf('es') > -1) document.location.href = 'Spanish.htm';
else if (language.indexOf('sv') > -1) document.location.href = 'swedish.htm';
else if (language.indexOf('zh') > -1) document.location.href = 'chinese.htm';
else
document.location.href = 'english.htm';
</script>
var language = navigator.browserLanguage?navigator.browserLanguage:navigator.language;
alert(language);
if (language.indexOf('en') > -1) document.location.href = 'english.htm';
else if (language.indexOf('nl') > -1) document.location.href = 'dutch.htm';
else if (language.indexOf('fr') > -1) document.location.href = 'french.htm';
else if (language.indexOf('de') > -1) document.location.href = 'german.htm';
else if (language.indexOf('ja') > -1) document.location.href = 'japanese.htm';
else if (language.indexOf('it') > -1) document.location.href = 'italian.htm';
else if (language.indexOf('pt') > -1) document.location.href = 'portuguese.htm';
else if (language.indexOf('es') > -1) document.location.href = 'Spanish.htm';
else if (language.indexOf('sv') > -1) document.location.href = 'swedish.htm';
else if (language.indexOf('zh') > -1) document.location.href = 'chinese.htm';
else
document.location.href = 'english.htm';
</script>
0 0
- js 判断浏览器使用的语言
- js判断浏览器语言
- js判断用户使用的是什么浏览器
- js判断使用的是哪个浏览器
- 使用JS判断所用浏览器的类型
- JS判断用户使用的浏览器类型
- js 浏览器的判断
- 使用 JS 判断 浏览器类型
- 使用js判断浏览器类型
- js简单判断操作系统语言(浏览器)~
- JS判断浏览器语言自动跳转
- 使用js如何判断IE浏览器的位数
- JS判断当前使用的是哪个浏览器及其版本
- JS判断浏览器的类型
- js判断浏览器的类型
- js判断浏览器的类型
- JS判断浏览器的方法
- JS判断浏览器的平台
- [数论]POJ 3641/HOJ 2700 Pseudoprime numbers 快速幂
- TortoiseSVN使用
- 如何统计电脑配置信息
- cocos2dx 不用cygwin配置Android环境
- ipa安装文件制作
- js 判断浏览器使用的语言
- Intent数据传递
- C语言scanf问题
- Windbg调试64bit Dump的命令
- cookie与session
- python: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 20: ordinal not in rang
- 搞笑注释
- ERP IT主管工作记录--自己记录使用
- 人脉支撑系统