json 读取数据创建表格
XML/HTML Code
- <div id="mssg"></div>
- <table id="dataTable" align="center">
- <thead>
- </thead>
- <tbody>
- </tbody>
- </table>
JavaScript Code
- <script type="text/javascript">
- $("#dataTable").jsonTable({
- head : ['#','Operating System','Market Share'],
- json : ['id', 'name', 'share']
- });
- $("#dataTable").jsonTableUpdate({
- source : "data.json",
- rowClass : "rowClass",
- callback : function(){
- $("#mssg").html("Table updated at " + new Date());
- }
- });
- </script>
原文地址: http://www.freejs.net/article_jquerywenzi_157.html