//提交数据
$.ajax({
type: "POST",
url: "ChipSetResearchHandler.axd",
data: "flag=SaveCriterionInformation&projectType=" + projectType + "&statisticYearMonth=" + yearMonth + "&comment=" + remark + "&criterionValues=" +escape(criterionValues),
dataType: "json",
beforeSend: function() {
},
error: function(txt) {
},
success: function(obj) {
就是在那个变量名前面加上escape即可,这样在handler层不需要解码,因为是post方式自动解码;如果是用数组的形式传递,则不需要编码,举例如下:
var dataObj = {};
dataObj["flag"] = "SaveKPIData";
dataObj["GuideLineName"] = $