Wondering is there a function in javascript without jquery or any framework that allows me to serialize the form and access the serialized version?
Here is pure JavaScript approach:
var form = document.querySelector('form'); var data = new FormData(form); var req = new XMLHttpRequest(); req.send(data);
Though it seems to be working only for POST requests.
https://developer.mozilla.org/en-US/docs/Web/API/FormData
2.1m questions
2.1m answers
60 comments
57.0k users