Answers for "send serialized form data jquery"

0

send serialized form data jquery

var paramObj = {};
$.each($('#myForm').serializeArray(), function(_, kv) {
  if (paramObj.hasOwnProperty(kv.name)) {
    paramObj[kv.name] = $.makeArray(paramObj[kv.name]);
    paramObj[kv.name].push(kv.value);
  }
  else {
    paramObj[kv.name] = kv.value;
  }
});
Posted by: Guest on September-26-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language