how to get name array value in jquery 1

how to get name array value in jquery

var values = $("input[name='pname[]']")
              .map(function(){return $(this).val();}).get();

Here is what the above code is Doing:
1. Get all the input elements with name pname[]
2. Map the values of the input elements to an array
3. Get the array

Similar Posts