# js代码实现根据浏览器语言跳转不同网址功能

*Published:* 2023-11-16
*Author:* 客服001

#### 温馨提醒

如果文章内容或图片资源失效，请留言反馈，我们会及时处理，谢谢

本文最后更新于2023年11月16日，已超过 180天没有更新



```
<script> 
   !function () {
    var lang = navigator.language||navigator.userLanguage;
    lang = lang.substr(0, 2);
    if(lang == 'zh'){
        window.location.replace('   //中文链接
    }else{
        window.location.replace('   //英文链接
    }
  }()
</script>
```