子ノードとして入力タグを使用して祖先がtdであるノードのテキストを選択したいと思います。
入力は次のとおりです。
<tr>
<td width="1"><input type="checkbox" name="marketCodes" value="AE01" onclick="facetCheckboxClicked(this)"></td>
<td style="padding-left:5px;padding-right:5px;">Defense & Security (1028)</td>
<td width="1"><input type="checkbox" name="marketCodes" value="AE02" onclick="facetCheckboxClicked(this)"></td>
<td style="padding-left:5px;padding-right:5px;">Geotechnologies (96)</td>
<td style="padding-left:5px;padding-right:5px;">Aircraft Products & Services (594)</td>
</tr>
期待される出力は次のとおりです。
Defense & Security (1028)
Geotechnologies (96)