1
我無法選擇一組div
中的所有最後一個輸入以及其中的表格。 Here's a jsFiddle of my issue.jQuery select:容器的最後一個孩子
的簡化版本我的HTML結構:
<div class=".container">
<table>
<tbody>
<tr>
<td> <input /> </td>
<td> <input /> </td> <!-- last input in container -->
</tr>
</tbody>
</table>
</div>
<!-- More like this -->
<div class=".container"> ...
所以,如果我有5 .container
所產生的選擇將有5 input
的
我嘗試了以下選擇:
$('.container input:last-child')
也可以使用:變量$輸入= $( '容器TD:最後的型>輸入。'); – EricL