The jQuery serializedArray() Method is used to create a JavaScript array of objects by serializing form values. It operates on a jQuery collection of forms and form controls. You can select one or more form elements such as <input>, <textarea> or the form element itself.



jQuery serializeArray() example

Let's take an example of serializeArray() method.

<!DOCTYPE html>
<script src=""></script>
        var x = $("form").serializeArray();
        $.each(x, function(i, field){
            $("#results").append( + ":" + field.value + " ");
<form action="">
  First name: <input type="text" name="FirstName" value="Ajeet"><br>
  Last name: <input type="text" name="LastName" value="Maurya"><br>
<button>Serialize form values</button>
<div id="results"></div>
Related Tutorial
Follow Us #
Contents +