方式一:
$.ajax({
async: false,
type: "POST",
url:'${base}/platform/platform!saveConsult.action',
contentType : "application/x-www-form-urlencoded; charset=utf-8",
data:$("#aspnetForm").serialize(),
dataType: "json",
success: function (data) {
//后台返回的json数据
},
error: function () {
alert("操作异常!");
}
});
方式二:
$.post('${base}/platform/platform!getSearchResult.action', {
'ptConsultComplain.captcha':$.trim($(".searchBox input").val())
},
function(data){
});