我使用的是asp表格和repeater.i需要在點擊表格標題時對數據進行排序。當我點擊表格標題時,如何排序表格數據?誰能幫助我,請 我的HTML代碼如下桌面排序當表格標題被點擊
<div class="blue"> <table id="mytable" data-sortable class="table table-hover table-striped"> <thead> <tr> <th id="sl">Code</th> <th id="nm">Name</th> <th data-sortable="false">Edit</th> <th data-sortable="false">Delete</th> </tr> </thead> <tbody> <asp:Repeater runat="server" id="rptArea" > <ItemTemplate> <tr> <td> <strong> <%# Eval("strAreaCode")%></strong></td> <td> <%# Eval("strAreaName")%></td> <td> <div class="btn-group btn-group-xs"><a href="AreaMaster.aspx?strAreaCode=<%# Eval("strAreaCode")%>&Action=Edit" data-toggle="tooltip" title="" data-original-title="Edit"> <i class="fa fa-edit" style="font-size:24px;color:red;"></i> </a> </div> </td> <td> <div class="btn-group btn-group-xs"> <a href="AreaMaster.aspx?strAreaCode=<%# Eval("strAreaCode")%>&Action=Delete" onclick="return confirm('Are you sure?')" data-toggle="tooltip" title="Delete"> <i class="fa fa-trash" style="font-size:24px;color:green;"> </i> </a> </div> </td> </tr> </ItemTemplate> </asp:Repeater> </tbody> </table>