我有一个表,其中包含恰好具有一个th和一个td的行,如下所示:
<tr>
<th>Phone Number</th>
<td>555-555-1212</td>
</tr>我需要使用文本"Phone Number“选择td单元格(并替换html)。我可以拿到th细胞
$('th:contains("Phone Number")')但是我不知道如何选择相应的td小区。
发布于 2013-04-23 11:25:05
$('th:contains("Phone Number")').next('td');发布于 2013-04-23 11:25:15
$('th:contains("Phone Number")').next("td")发布于 2013-04-23 11:27:16
var html = "some html";
$('th:contains("Phone Number")').next('td').html(html);https://stackoverflow.com/questions/16160366
复制相似问题