var formData = {};
$.each(form.serializeArray(),function(i, item){
formData[item.name] = item.value;
});
$.ajax({
cache: true,
type: "POST",
url:ajaxCallUrl,
data:$(‘#yourformid‘).serialize(),// 你的formid
async: false,
error: function(request) {
alert("Connection error");
},
success: function(data) {
$("#commonLayout_appcreshi").parent().html(data);
}
});
jquery将form表单序列化常json,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/lovezhaolei/p/3818939.html