Language of the browser: zh-TW
var x = "Language of the browser: " + navigator.language;
var txt = "";
txt += "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt += "<p>Browser Name: " + navigator.appName + "</p>";
txt += "<p>Browser Version: " + navigator.appVersion + "</p>";
txt += "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt += "<p>Browser Language: " + navigator.language + "</p>";
txt += "<p>Browser Online: " + navigator.onLine + "</p>";
txt += "<p>Platform: " + navigator.platform + "</p>";
txt += "<p>User-agent header: " + navigator.userAgent + "</p>";
<script type=text/javascript>
// if( (/http\:\/\/t\.smartisan\.com\/smartisan\/modules\/index\/\#\/$/g).test(location.href)) {
if( (/http\:\/\/www\.smartisan\.com.$/g).test(location.href) || (/http\:\/\/www\.smartisan\.com\/\#\/$/g).test(location.href)) {
// ['ja', 'en-GB', 'en', 'en-US', 'fr', 'es', 'ko', 'de'];
// 首页,如果是英文环境,则跳到 en
if((/en/gi).test(navigator.language)) {
location.href = 'http://www.smartisan.com/en/';
}
// 首页,如果是日文环境,则跳到 jp
else if((/(jp|ja)/gi).test(navigator.language)){
location.href = 'http://www.smartisan.com/jp/';
}
}
</script>