ajax发送请求,设置了头信息:
但是在调试过程中发现,请求头还是charset=UTF-8contentType: 'application/x-www-form-urlencoded; charset=big5',
导致发送的中文是utf8格式,这个时候,可以在前段发送中文时,进行转码
然后在后台,文件继续使用big5格式,对接收到的中文进行解码:encodeURIComponent(row.querySelector('td:nth-child(2) input').value);
<%
WS_FNM = Request.Form("WS_FNM")
response.write jsDecodeURIComponent(WS_FNM)
%>
<script language="jscript" runat="server">
function jsDecodeURIComponent(str){return decodeURIComponent(str) }
</script>
发表评论 取消回复