AJAX中文乱码(prototype.js)
我在SERVLET中进行了转码:
response.setHeader("Content-Type","text/html; Charset=GB2312");
request.setCharacterEncoding("GB2312");
加了这样的两句
页面上
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
var myAjax = new Ajax.Request(
url,
{
method:'POST',
parameters:pars,
encoding:'GB2312',
onComplete:showReturn
});
就是prototype.js中也改成了 GB2312可还是中文变成了乱码,
有知道的请回复