jquery - Get the value form a another input field -
this input field on fourth place:
<td><input type="number" name="tour" value="12" size="2" maxlength="2"></td> this js dosnt work:
var htour = $(this).parents('tr').find('td:nth-child(4)').val(); whats wrong?
your javascript getting value of td element. want input element's value:
var htour = $(this).closest('tr').find('td:nth-child(3) input').val(); :nth-child() zero-indexed, :nth-child(0) first element, :nth-child(1) second, , on.
Comments
Post a Comment