<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script>
$(function() {
$("#myTable").tablesorter();
});
$(document).ready(function()
{
$("#myTable").tablesorter( {sortList: [[0,0], [1,0]]} );
}
);
</script>
<html>
<head>
<div id="main">
<%
SET RS = objconn.execute(SQL)
IF NOT RS.EOF THEN
Response.Write "<table id= 'myTable' width='100%' cellpadding='0' cellspacing='0' border='1px'>"
Response.Write "<tr>"
Response.Write "<td class='tdcell1' colspan='1'>"
Response.Write "ID"
Response.Write "</td>"
Response.Write "<td class='tdcell1' colspan='1'>"
Response.Write "Date"
Response.Write "</td>"
Response.Write "<td class='tdcell1' colspan='1'>"
Response.Write "Title"
Response.Write "</td>"
Response.Write "<td class='tdcell1' colspan='1'>"
Response.Write "Author"
Response.Write "</td>"
Response.Write "<td class='tdcell1' colspan='1'>"
Response.Write "Image Name"
Response.Write "</td>"
Response.Write "</tr>"
While NOT RS.EOF
Response.Write "<tr>"
Response.Write "<td class='tdcell' colspan='1'>"
Response.Write RS("id")
Response.Write "</td>"
Response.Write "<td class='tdcell' colspan='1'>"
Response.Write RS("launchdate")
Response.Write "</td>"
Response.Write "<td class='tdcell' colspan='1'>"
Response.Write RS("title")
Response.Write "</td>"
Response.Write "<td class='tdcell' colspan='1'>"
Response.Write RS("firstname") & " " & RS("lastname")
Response.Write "</td>"
Response.Write "<td class='tdcell' colspan='1'>"
Response.Write RS("bimg")
Response.Write "</td>"
Response.Write "</tr>"
RS.Movenext
Wend
Response.Write "</table>"
END IF
RS.Close
Set RS = Nothing
END IF
%>
</div>
</body>
</html>
我正在尝试按字母顺序对表格的日期(按升序和降序)和作者姓名进行排序。我听说过“表格分类器插件”,但我认为它只适用于标准的html表,因为我尝试时失败了。附上我正在处理的代码不起作用。我只是让你们都知道我在做什么以及如何工作。我希望日期标题带有漂亮的小箭头进行排序,但无法得到它。