用法:
1.添加JS
QUOTE: <SCRIPT src="../../sorttable.js" type="text/JavaScript"></SCRIPT>
2.添加TABLE,注意的是:一定要有ID,class为"sortable"
QUOTE: <table class="sortable" id="mytable">
OK,可以了,简单的吧
如果觉得太单调,自己加点CSS吧,官方给出了改HEAD的CSS
QUOTE: /* Sortable tables */ table.sortable a.sortheader { background-color:#eee; color:#666666; font-weight: bold; text-decoration: none; display: block; } table.sortable span.sortarrow { color:black; text-decoration: none;
|