|
|
<div style="margin: 15px;">因为AJAX默认是以UTF-8传输字符的,所以不经常出现中文乱码问题。
我在用tomcat5+struts从action中返回中文到xmlHttp.responseText,就出现乱码。
在代码中加入
<div style="padding: 4px 5.4pt; width: 95%;"> response.setHeader("Content-Type", "text/html;charset=GB2312"); |
|