1
I have this code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-maskmoney/3.0.2/jquery.maskMoney.min.js"></script>
<script>
$(function() {
$('#Preco').maskMoney({ decimal: '.', thousands: ' ', precision: 2 });
})
</script>
$tabela1 .= '<td style="font-size: 12px"> <input type="text" name= "Preco['.$rows_cursos['IdRequisicao'].']" id= "Preco" value="0.00"></td>';
When the user uses the price column to enter the value, only the first row of the table works correctly, as shown in the image:
Attribute
id
of HTML must be unique on the page. It is the element identifier - as well as your CPF. Change your logic to something other than theid
that might work.– Woss