我有一个包含每行中下拉列表的表格。行没有id属性。所以,因为行没有id属性,我怎么能得到下拉列表中选定的项目和相应的ID列的值。例如,如果我从第一行中选择一个项目我想要的项目和ID列的值的值,即204使用jQuery选择表格行的值
这是上表中的HTML代码
<table class="table-1 gapmb40">
<thead>
<tr>
<th>
Status
</th>
<th>
<a class="sortable" href="">Featured</a>
</th>
<th>
</th>
<th>
<a class="sortable" href="">Date Modified</a>
</th>
<th>
</th>
<th>
ID
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<select class="input-2" name="2">
<option value="New">New</option>
<option selected="selected" value="Live">Live</option>
<option value="AccountOnly">AccountOnly</option>
<option value="Hide">Hide</option>
<option value="Suspended">Suspended</option>
</select>
</td>
<td>
<a href="">Feature</a>
</td>
<td>
<a href="">View</a>
</td>
<td>
07/03/2013
</td>
<td style="display: none">
<a href="">LogOnAs</a>
</td>
<td>
204
</td>
</tr>
</tbody>
</table>
显示您的HTML。 – 2013-04-22 12:56:59