Help:使用維基標記式語言增修表格/4
外观
如果某個表格由視覺化編輯器產生,在對話視窗當中會有一個可開啟項目「可排序」。如果您開啟了這個項目,讀者將能夠依任何欄位自由排列資料的順序,只要點選各欄的表頭格子即可。
如果是已存在的表格,或是由Wiki語法產生的表格,您可以在表格開頭的「class」屬性增加「wikitable sortable
」使其可以排序:
{| class="wikitable sortable" |- ! 名稱 ! 資料 ! 更多資料 |- | 貓 | 273 | 53 |- | 狗 | 65 | 8,492 |- | 老鼠 | 1,649 | 548 |}
名稱 | 資料 | 更多資料 |
---|---|---|
貓 | 273 | 53 |
狗 | 65 | 8,492 |
老鼠 | 1,649 | 548 |
Clicking on the up/down arrows in a column header will sort the column; clicking again will reverse the sort. Text is sorted alphabetically. Numbers are sorted numerically. Mixed data is sorted alphabetically.
For advanced sort options, see Help:Sorting.