Answers for "share button serialized object data value change"

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
0

for(let [key,val] in obj){ messageBody = messageBody.replace("{"+ key + "}",val) }

for (let key in obj){
      messageBody = messageBody.replace("{"+ key + "}", obj[key])
    }
Posted by: Guest on May-11-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language