引用jQuery和table.js
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script> <script src="js/table.js"></script>
html
<div class="table-list"> <table> <thead> <tr> <th>标题1</th> <th>标题2</th> <th>标题3</th> <th>标题4</th> <th>标题5</th> </tr> </thead> <tbody> <tr> <td>内容1</td> <td>内容2</td> <td>内容3</td> <td>内容4</td> <td>内容5</td> </tr> </tbody> </table> </div>
调用插件
$(".table-list").setTable();