2016-12-28 84 views
3

我在聯盟的官方網站(https://www.w3.org/TR/html5/tabular-data.html#the-table-element - https://www.w3.org/TR/2014/WD-html51-20140617/tabular-data.html#attr-table-sortable)上沒有找到答案,也沒有在Mozilla開發人員網站(https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes)上找到答案。哪些網頁瀏覽器支持HTML5屬性排序?

謝謝你的時間。

<table sortable> 
 
    <tr> 
 
    <th sorted> 1 </th> 
 
    <th sorted> 2 </th> 
 
    </tr> 
 
    <tr> 
 
    <td> aaa </td> 
 
    <td> bbb </td> 
 
    </tr> 
 
    <tr> 
 
    <td> xxx </td> 
 
    <td> zzz </td> 
 
</tr> 
 
</table>

+1

我非常懷疑sortable是瀏覽器識別的一個屬性,用於排序 - 它很可能是由插件添加的,或者是標記中的插件所要求的。你從哪裏瞭解到這個屬性? – Terry

+2

https://www.w3.org/TR/2014/WD-html51-20140617/tabular-data.html#attr-table-sortable – Juri

+2

'sortable'似乎只在舊的工作草案中提及。這在最新的草案中沒有提到。考慮一下,它根本沒有在某個地方進行剪輯。 – deceze

回答

6

sortable 在HTML 5.1的屬性,它本來應該更早包括在內,但現在它已經過時了。所以目前沒有瀏覽器支持它。有關詳細信息,請參考this

3

表格排序模型已在HTML規範was removed in January 2016中。

因此it’s not correct that sortable is an attribute that’s part of an 「upcoming HTML version and is not officially released「。 W3C HTML 5.1規範a final Recommendation已被取代,並且無論如何the sortable attribute was not in HTML 5.1

沒有瀏覽器曾經本地支持sortable屬性,並且除非/直到它稍後再次被重新指定爲止。它不包含在http://caniuse.com/之中的原因 - 並且從未包含在其中 - 是caniuse.com不追蹤支持零瀏覽器的功能。

相關問題