jQuery param() Method

Last Updated:

jQuery param() Method

The jQuery param() method creates a serialized representation of an array, a plain object, or a jQuery object suitable for use in a URL query string or Ajax request.


HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>jQuery param() Method</h1> <p>Click on the button to change object to serialize</p> <button>Click Me</button> <div></div> <script> $(document).ready(function(){ var obj = { name: "Jade", age : 18, hair : "blonde" }; $("button").click(function(){ $("div").text($.param(obj)); }); }); </script> </body> </html>


$.param(obj, tradition);

Parameter Values

Value Type Explanation
obj Required Specifies an array, a plain object, or a jQuery object to serialize.
tradition Optional Specifies whether to perform a traditional "shallow" serialization.

Browser Support

Browsergoogle chromesafarifirefoxinternet Exploreredgeoperagoogle chromesafarifirefoxedgeoperaandroid webviewsamsung internet

Share this Page

Meet the Author