There’s a function that does exactly this:
http://api.jquery.com/serialize/
var data = $('form').serialize();
$.post('url', data);
More Related Contents:
- Multiple input validation
- Why the Ajax script is not running on IIS 7.5 Win 2008 R2 server?
- jQuery callback for multiple ajax calls
- Stop all active ajax requests in jQuery
- jQuery doesn’t work after content is loaded via AJAX
- How to fire AJAX request Periodically?
- Difference between $.ajax() and $.get() and $.load()
- jQuery.ajax() method’s async option deprecated, what now?
- Submit form using AJAX and jQuery
- CORS header ‘Access-Control-Allow-Origin’ missing
- How do I POST with jQuery/Ajax in Django?
- jQuery Form Validation before Ajax submit
- jQuery: Load Modal Dialog Contents via Ajax
- Detecting a redirect in ajax request?
- Use success() or complete() in AJAX call
- What are the drawbacks of using synchronous ajax call?
- Can onprogress functionality be added to jQuery.ajax() by using xhrFields?
- how can I use data posted from ajax in flask?
- How do I PUT data to Rails using JQuery
- How to return an object from a Spring MVC controller in response to AJAX request?
- jQuery Ajax request every 30 seconds
- jQuery Ajax returning 404 Error, but correct Response
- Ajax Not working in IOS 9.0 Cordova
- jQuery ajax inside a loop problem
- Ajax Form submit with preventDefault
- HTML5 validation before ajax submit
- Accessing web Service from jQuery – cross domain
- jQuery validator plugin + ajax submitting not working
- JQuery Ajax is sending GET instead of POST
- Rails accepts_nested_attributes_for with f.fields_for and AJAX