serialize()
method in JQuery?serialize()
method is used to create a text string in standard URL-encoded notation. It serializes the form values so that its serialized values can be used in the URL query string while making an AJAX request.$(document).ready(function(){
$("button").click(function(){
$("div").text($("form").serialize());
});
});