javascript serialize data from form code example
Example 1: how to serialize form data in jquery
$("button").click(function(){
$("div").text($("form").serialize());
});
Example 2: js form serialize
var form = document.querySelector('form');
var data = new FormData(form);