我尝试使用jQuery来识别包含特定HTML注释文本的<td>元素。标准的“:contains”选择器似乎没有查找注释。我的上下文是我想动态添加一些内容到同一个td元素中。这里是目标td的示例:
<TD valign="top" class="ms-formbody" width="400px">
<!-- FieldName="Title"
FieldInternalName="Title"
FieldType="SPFieldText"
-->
<span dir="none">
<input name="ctl00$m$g_0b1e4ca3_9450_4f3e_b3af_8134fe014ea5$ctl00$ctl04$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$TextField" type="text" maxlength="255" id="ctl00_m_g_0b1e4ca3_9450_4f3e_b3af_8134fe014ea5_ctl00_ctl04_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField" title="Title" class="ms-long" /><br>
</span>
</TD>
这个HTML是SharePoint生成的新列表项表单的一部分,我想要找到我的文档中"FieldInternalName"在注释中匹配某个文本字符串的td。我该如何使用jQuery(或任何JavaScript都可以)来最好地查找这些td元素?