JQuery provides a method called serialize, which takes all your form data and converts it into a URL-encoded string.
So, if you want to submit all your form data via ajax, you would call the serialize method, like so:
formData = $(‘form’).serialize();
With this convention, the formData value would be something like:
Now, you can simply send this data to the server with a statement like:
Check out the JQuery API for more info: