使用如下代码实现中英文网页切换。
<script>
<!--
if (navigator.appName == 'Netscape')
var language = navigator.language;
else
var language = navigator.browserLanguage;
if (language.indexOf('zh-cn') > -1) document.location.href = 'https://www.williamlong.info/';
else if (language.indexOf('en') > -1) document.location.href = 'https://www.williamlong.info/index.htm';
else
document.location.href = 'https://www.williamlong.info/';
//-->
</script>