jQuery serialize()

Some important features of jQuery serialize() method are;

  • jQuery serialize() method creates a text string in standard URL-encoded notation.
  • It is used in form controls.
  • It serializes the form values, the serialized values can then be used in the URL query string.


$ (selector).serialize()  


<!DOCTYPE html>  
 <script src="https://code.jquery.com/jquery-1.10.2.js"></script>  
<form action="">  
  First name: <input type="text" name="Mailid" value="test.com"><br>  
  Last name: <input type="text" name="UserName" value="Jai"><br>  

Try it

JS Bin on jsbin.com

Content Protection by DMCA.com
Please Share