It has a table mounted, that each row is added dynamically. Therefore, within <tbody>
is added the <tr's>
(lines).
Inside the tr, it has the <td's>
and each <td>
has a input
inside.
Imagine that I can added 5 t's. So if I want to get a value of 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 dynamically placed, how do I get for example 6 tr's placed, get the value of input#f_VLR_APROP_CCUST
of the 4th tr or whichever one I choose?