我有一个文件notfound.php
,它返回英语和泰语的可用关键字列表。它包含
meta http-equiv='Content-Type content='text/html; charset=tis-620'".
如果我使用我拥有的任何浏览器请求页面,泰语会正确显示,使用 JavaScript 调用同一文件时会错误地输出泰语。
document.getElementById("area").innerHTML=xmlhttp.responseText;
xmlhttp.open("GET","notfound.php?&mat=" + Math.random(),true);
xmlhttp.send();
该片段来自一个还包含的文件
meta http-equiv='Content-Type' content='text/html; charset=tis-620
'。
返回到“区域”的文本仅在 Chrome 中正确显示。