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
1.4m articles
1.4m replys
5 comments
57.0k users