修改POST时的字符编码

来源:互联网 发布:网络语nl什么意思 编辑:程序博客网 时间:2024/05/29 17:06

var isie=(document.all && window.ActiveXObject && !window.opera && navigator.userAgent.indexOf("MSIE")>0) ? true : false;


 if(isie)
{
      document.charset='ISO-8859-1';
}else
{
      document.forms[0].acceptCharset='ISO-8859-1';
}

 

与此相关的

<meta http-equiv='Content-Type' content="text/html;charset=<?=$charset?>" />