Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);
    });
  });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #form #serialize #object
ADD COMMENT
Topic
Name
8+5 =