【发布时间】:2020-11-02 03:10:50
【问题描述】:
与这个问题非常相似:Sort table rows based on their Class Names - 但需要它使用纯 JavaScript 而不是 JQuery。
它需要能够按类名排序。
考虑下表:
<table>
<thead>
<th>Column</th>
</thead>
<tbody>
<tr>
<td class="High">High</td>
</tr>
<tr>
<td class="Medium">Medium</td>
</tr>
<tr>
<td class="Low">Low</td>
</tr>
</tbody>
</table>
函数需要按特定顺序按高、中、低对表格进行排序。
【问题讨论】:
-
这能回答你的问题吗? w3schools.com/howto/howto_js_sort_table.asp
-
感谢您的回复。不是真的,因为它需要按一定的顺序。我将重新提出我的问题。
标签: javascript