param

parameter

ajax param() method syntax

Function:The param() method creates a serialized representation of an array or object. This serialized value can be used in the URL query string when making AJAX requests.

Syntax:jQuery.param(object,traditional)

##Parameters:

Parameter Description object The array or object to be serialized. traditional Specifies whether to use the traditional method for shallow serialization (parameter serialization).

Description: Theparam() method is used to internally convert the element value into a serialized string representation. See .serialize() for more information. For jQuery 1.3, if the passed parameter is a function, then using .param() will get the return value of the function instead of returning the function as a string. For jQuery 1.4, the .param() method will serialize objects through deep recursion to meet the needs of modern scripting languages, such as PHP, Ruby on Rails, etc. You can disable this feature globally by setting jQuery.ajaxSettings.traditional = true; If the object being passed is in an array, it must be an object array in the format of the return value of .serializeArray(): [{name:"first",value:"Rick"},{name:"last",value: "Astley"},{name:"job",value:"Rock Star"}]

ajax param() method example

    
Run instance »

Click the "Run instance" button to view the online instance