2
It has a mounted table, which each row of it is added dynamically. So, inside the <tbody>
is added the <tr's>
(lines).
Inside the three, there’s the <td's>
and each <td>
has a input
within.
Imagine that I can added 5 t’s. So if I want to catch a value from the first tr
, i use:
$('#d_sfiSRV003 #d_GRD_CENTROS_CUSTO tr:first-child').find('input#f_VLR_APROP_CCUST').val();
d_sfiSRV003 - id da pagina;
d_GRD_CENTROS_CUSTO - id da tabela
tr:first-child - seleciono o primeiro tr q tiver
input#f_VLR_APROP_CCUST - busco o input com a id referida e pego seu valor.
But if the tr’s are placed dynamically, as I do to take for example 6 tr’s placed, take the value of input#f_VLR_APROP_CCUST
of the 4th tr or any one I choose?
All your inputs will have the same ID?
– José Francisco
first-child
don’t take the first, take the first child.– Sam