1 2 3 |
<input type="text" value="2" name="total_price[]"> <input type="text" value="1" name="total_price[]"> <input type="text" value="4" name="total_price[]"> |
1 2 3 4 5 6 7 |
<script> var prices = $("input[name='total_price[]']") .map(function(){return $(this).val();}).get(); $.each(prices, function( index, value ) { console.log( index + ": " + value ); }); </script> |