Home >>jQuery Tutorial >jQuery $.param() Method

jQuery $.param() Method

jQuery $.param() Method

The $.param() method in jQuery is used to creates a serialized representation of an array or an object values can be used in the URL query string when making an AJAX request.


Parameter Values

Parameter Description
object It is a Required parameter and is used to specifies an array or object to serialize
trad It is an Optional parameter and is used to a Boolean value specifying whether or not to use the traditional style of param serialization
Here is an Example of jQuery param() Method:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
personObj = new Object();
personObj.firstname = "Mohan";
personObj.lastname = "Kumar";
personObj.age = 25;
personObj.eyecolor = "Brown"; 
<button class="btn1">Click me to Get Serialize object</button>
<div class="div1"></div>