fix:修复optgroup标签多选后值转json后丢失的问题
This commit is contained in:
@ -1353,7 +1353,11 @@
|
||||
formToJSON: function(formId) {
|
||||
var json = {};
|
||||
$.each($("#" + formId).serializeArray(), function(i, field) {
|
||||
json[field.name] = field.value;
|
||||
if(json[field.name]) {
|
||||
json[field.name] += ("," + field.value);
|
||||
} else {
|
||||
json[field.name] = field.value;
|
||||
}
|
||||
});
|
||||
return json;
|
||||
}
|
||||
|
Reference in New Issue
Block a user