动态添加json数据
var
formData= [];
$(
".form"
).each(
function
(n){
var
data = {};
var
fieldname = $(
this
).attr(
"name"
);
var
value = $(
this
).val() ||
""
;
data[fieldname] = value;
});
formData.push(data);