seriallize form in js code example Example: js form serialize var form = document.querySelector('form'); var data = new FormData(form);