Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery Miscellaneous param() method

jQuery Miscellaneous param() method

jQuery Miscellaneous Methods jQuery Miscellaneous Methods

Example

Output the result of serializing an object:

$("button").click(function(){

$("div").text($.param(personObj));

});

Try it »


Definition and Usage

The param() method creates a serialized representation of an array or object.

The serialized values can be used in a URL query string when generating an AJAX request.


Syntax

$.param(

object,trad

)

Parameters Description
object Required. Specifies the array or object to serialize.
trad Optional. A Boolean specifying whether to use the traditional style of parameter serialization.

jQuery Miscellaneous Methods jQuery Miscellaneous Methods