Answers for "form serialize to json jquery"

0

jquery serialize form data to object

var data = {};
$(".form-selector").serializeArray().map(function(x){data[x.name] = x.value;});
Posted by: Guest on September-01-2021
1

jquery form serialize object

$(function(){
  $('form').on('submit', function(e){
    e.preventDefault();
    $(this).serializeObject().done(function(o){
      if(window.console) console.log(o);
      var j = JSON.stringify(o);
      alert(j);
      //window.open("data:image/png;base64," + o.userfile.data);
    });
  });
});
Posted by: Guest on May-01-2020

Code answers related to "form serialize to json jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language