How to use serialize() Method in JQuery AJAX

In this article, I will explain use of serialize() Method in JQuery AJAX.
  • 2418

JQuery AJAX serialize() Method

  • serialize() method creates a URL encoded text string by serializing form values when making an AJAX request..
  • serialize() method operates on a jQuery object representing a set of form elements.






The following example show the use of serialize() method.


<!DOCTYPE html>



<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">

    $(document).ready(function () {

        $("button").click(function () {







<h2>serialize() Method Example</h2>

<form action="">

First name: <input type="text" name="FirstName" value="Dinesh" /><br />

Last name: <input type="text" name="LastName" value="Kumar" /><br />


<button>Click for serialize form values</button>






You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.