jquery get value of multiple input with same name code example
Example: jquery get multiple input values by name
<input name="titles[]">
<input name="titles[]">
<button>submit</button>
// click handler
function onClick(event) {
var titles = $('input[name^=titles]').map(function(idx, elem) {
return $(elem).val();
}).get();
console.log(titles);
event.preventDefault();
}
// attach button click listener on dom ready
$(function() {
$('button').click(onClick);
});