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

jQuery param() method

jQuery param() method

jQuery AJAX methods jQuery AJAX 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 AJAX methods jQuery AJAX methods