我需要检查表格中是否显示了某个列。每列都有一个带有唯一 ID 的 TH 标头。检查表中 TH 元素是否存在的最佳方法是什么?
这是表格代码的示例。
<table id="attr-table">
<thead>
<tr>
<th id="attr-action-col"><input type="checkbox" value="" class="attr-action-box" id="attr-action-col_box"></th>
<th id="attr-name-col">Name<span class="ui-icon ui-icon-triangle-1-n"></span></th>
<th id="attr-type-col"></th>
<th id="attr-scope-col"></th>
<th id="attr-value-col">English Value</th>
<th id="attr-master-col">Master Value</th>
<th id="attr-translation-col">T</th>
<th id="attr-workflow-col">Status</th>
<th id="attr-history-col">H</th>
</tr>
</thead>
<tbody>
....
</tbody></table>
TIA