jQuery Tutorial Tutorials - jQuery .serialize()

jQuery .serialize()

The .serialize() method in jQuery is used to serialize the form data to a string for submission.

jQuery .serialize() syntax

.serialize()

jQuery .serialize() VS .serializeArray()

The output of serialize() is a string,
The output of serializeArray() is an array

jQuery .serialize() example

example

$( "form" ).on( "submit", function( event ) {
  event.preventDefault();
  console.log( $( this ).serialize() );
});

Try now

Date:2019-08-30 03:03:32 From:www.Lautturi.com author:Lautturi