Easy learning with example program codes

jQuery Form

jQuery form is a part of jQuery AJAX methods. AJAX (Asynchronous JavaScript and XML) can be defined as an art of exchanging data with a server which includes loading data in the background and updating only the specific parts of a web page, without reloading the whole page.

With AJAX functionality, jQuery provides several methods to load the external data directly into the selected HTML elements of the web page, thus, provides a functionality of creating and submitting forms.

Some of these methods are:

  • jQuery serialize(): jQuery serialize() method is used to encode a set of form elements as a string for submission.
  • jQuery serializeArray(): jQuery serializeArray() method is used to encode a set of form elements as an array of names and values.



<!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="Mailid" value=""><br>  
  Last name: <input type="text" name="UserName" value="Paplu"><br>  
<div id="results"></div>  

Try it

JS Bin on

Sign Up/ Sign In
Ask a Question

Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at


We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on

Copyright © 2018 CodesJava Protection Status SiteMap Reference: Java Wiki