[三卷天书]ajax请求时接收到乱码的处理方案

$.ajax({
url: "getmore.ashx",
type: "post",
dataType: "text",
data: { id: articleid, ct: $("#CommentBody").val(), action: "addpl" },
contentType: "application/x-www-form-urlencoded; charset=utf-8",/*加多这个编码的属性*/
success: function(data) {
if (data == 1) {
LoadPinglun();
} else {
alert("评论失败!请刷新页面重试");
}
}
});

posted @ 2015-01-15 15:27  三卷天书  阅读(226)  评论(0编辑  收藏  举报