Example Output the result of serialized form value:
$("button").click(function(){
$("div").text($("form").serialize());
});
Definition and Usage The
serialize() method creates a URL-encoded text string by serializing form values.
You can select one or more form elements (such as inputs and/or text boxes), or the form element itself.
Serialized values can be used in URL query strings when generating AJAX requests.
Syntax
$(selector).serialize()
Detailed Description
.serialize() method creates a text string represented in standard URL encoding. It operates on a jQuery object that represents a collection of form elements.
There are several types of form elements:
Output standard query string :
a=1&b=2&c=3&d=4&e=5
Note: Only "successful controls" will be serialized into strings. If you do not use a button to submit the form, the submit button's value is not serialized. If you want a form element's value to be included in a sequence string, the element must use a name attribute.