Home » Internet » How to get form values by serializeArray() jQuery function

How to get form values by serializeArray() jQuery function

The following jquery script can use for get form input values
<script type=”text/javascript”>// <![CDATA[
//function to get form values
function getformValues() {

var fields = $(“:input”).serializeArray();

$(“#smarttips-div”).empty();

jQuery.each(fields, function(i, field){

$(“#smarttips-div”).append(field.value + ” “);

});

}
//call function to get form values

getformValues();
</script>

Leave a Reply

x

Check Also

How to delete your whatsapp status

WhatsApp is a famous messaging App on the internet. Now Facebook is managing Whatsapp. Whatsapp is ...