Posted On: Feb 22, 2018
The param() method is used to represent an array or an object in serialize manner.
While making an ajax request we can use these serialize values in the query strings of URL.
Syntax:
$.param(object | array, boolValue)
“object | array” specifies an array or an object to be serialized.
“boolValue” specifies whether to use the traditional style of param serialization or not.
Example
personObj=new Object(); empObject.name="Ravi"; empObject.age="28"; empObject.dept="IT"; $("#clickme").click(function(){ $("span").text($.param(empObject)); });
It will set the text of span to “name=Ravi&age=28&dep=IT”
Never Miss an Articles from us.
jQuery is a lightweight JavaScript library which gives a quick and simple method for HTML DOM traversing and manipulati..
There are many advantages of JQuery. Some of them are :It is more like a JavaScript enhancement so there is no overhea..
There are 3 types of selectors in JqueryCSS Selector XPath Selector Custom Selector..