3
I have a table and within the <td>
I have two input:
<input id="CdProduto" value="15" hidden>
<input type="number" value="2" class="form-control">
I need when to change the value
of input number
he returns me the value
of input
CdProduto
.
Remembering that this link will repeat itself according to the quantity of product.
$(":input").bind('keyup mouseup', function () {
alert("changed");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table class="table">
<thead>
<tr>
<th colspan="2">Produto</th>
<th>Quantidade</th>
<th>Valor unitário</th>
<th>Desconto</th>
<th colspan="2">Sub Total</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="#">
<img alt="White Blouse Armani">
</a>
</td>
<td><a href="/produtos/2">Pao</a>
</td>
<td>
<input id="CdProduto" value="2" hidden>
<input type="number" value="1" class="form-control">
</td>
<td>R$ 1,00</td>
<td>R$ 0,00</td>
<td>R$ 1,00</td>
<td><a href="#"><i class="fa fa-trash-o"></i></a>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="5">Total</th>
<th colspan="2">R$ 1,00</th>
</tr>
</tfoot>
</table>
How am I gonna do this ?