Tutorials References Exercises Bootcamps Videos Menu
Sign Up Create Website Get Certified Upgrade

jQuery serializeArray() Method

❮ jQuery AJAX Methods


Output the result of form values serialized as arrays:

  var x = $("form").serializeArray();
  $.each(x, function(i, field){
    $("#results").append(field.name + ":" + field.value + " ");
Try it Yourself »

Definition and Usage

The serializeArray() method creates an array of objects (name and value) by serializing form values.

You can select one or more form elements (like input and/or text area), or the form element itself.



❮ jQuery AJAX Methods