0
我想選擇其祖先是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)