ajax发送请求,设置了头信息:

contentType: 'application/x-www-form-urlencoded; charset=big5',
但是在调试过程中发现,请求头还是charset=UTF-8

导致发送的中文是utf8格式,这个时候,可以在前段发送中文时,进行转码

encodeURIComponent(row.querySelector('td:nth-child(2) input').value);
然后在后台,文件继续使用big5格式,对接收到的中文进行解码:

<%
WS_FNM = Request.Form("WS_FNM")
 response.write jsDecodeURIComponent(WS_FNM)
%>
<script language="jscript" runat="server">
 function jsDecodeURIComponent(str){return decodeURIComponent(str) }
</script>