[ajax]xmlHttp.responseText的默认编码是UTF-8

xmlHttp.responseText的默认编码是UTF-8

而response如果没有显式设置的话,不管request的编码是什么,response的编码就是ISO-8859-1。所以将servet 与 ajax联用的时候,注意将response的编码设成与ajax一致

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.