Hi, I'm trying to add data from a form to a table, but when I click the add button, I capture the values at zero. The code is as follows:
Pay
Way to pay
CashCredit / Debit CardChequeOther
Voucher
Add payment
</thead>
<tbody id="bodypago">
</tbody>
</table>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var cantpa= $("#cantpa").val();
var tipopa = $("#micombo").val();
$("#addpa").on('click', function(e){
$("#bodypago").append("<tr><td>"+cantpa+"</td><td>"+tipopa+"</td></tr>");
});
</script>