JavaScript获取浏览器语言

   function aaa() {
            var localLG;
            localLG = navigator.language;
            //alert(localLG);
            if (localLG == "zh-CN") {
                window.location.href = "zh/whatson.aspx";
            } else {
                window.location.href = "en/whatson.aspx"; 
            }
        }

 

posted @ 2013-01-13 15:19  StevenFu  阅读(260)  评论(0编辑  收藏  举报