There are markup
<form class="inputs"> <input type="text" value="1"/> <input type="text" value="2"/> <input type="text" value="3/> </form> When you click on the button, you need to get all the input values and write to the array.
I do it but does not work.
$('.test').click(function() { var test = []; $('.inputs').find(':input').each(function(i, input) { test.push(input.value()); }); });