【发布时间】:2014-02-15 20:21:04
【问题描述】:
我对 jQuery 选择器不是很熟悉,所以需要一些帮助。
我有一张这样的桌子:
<table class="test">
<tr>
<td>Section Heading 1</td><td>Section Text 1</td>
</tr>
<tr>
<td>Section Heading 2</td><td>Section Text 2</td>
</tr>
<tr>
<td>Section Heading 3</td><td>Section Text 3</td>
</tr>
<tr>
<td>Section Heading 4</td><td>Section Text 4</td>
</tr>
<tr>
<td>Section Heading 5</td><td>Section Text 5</td>
</tr>
</table>
我需要做的是找到包含特定文本的td,并对其右侧的td中的文本进行操作。
例如,假设我要查找包含文本Section Heading 4 的td,并将td 中包含的文本与文本hello 连接起来,这样Section Text 4 就变成了Section Text 4 hello ..
哪些 jQuery 选择器可用于此目的?
【问题讨论】:
标签: javascript jquery css jquery-selectors html-table