【发布时间】:2014-07-08 02:21:18
【问题描述】:
我想使用带有 Bootstrap 主题的 DataTable 来显示我的表格结果(PHP 和 SQLSRV),它将使用 jquery $.get 函数加载到 div 中。
我尝试了下面的代码,但没有成功。以下是我的 jquery 代码,如果您能在这里为我提供一些解决方案,我们将不胜感激。
标题顺序上的 CSS:
- 引导程序
- 数据表引导
- 太棒了
- 日期选择器
- 风格
页脚顺序的JS
- jquery
- 引导
- jquery.datatables
- dataTables.bootstrap
- 日期选择器3
-
自定义
$(document).ready(function () { $("#getData").on('click', function () { var report = $(this).val(); if (report == 'tput') { var tputpage = 'reports/dtput.php', dstrt = $('#from_date').val(), dend = $('#to_date').val(); $.get(tputpage, { dstrt:dstrt, dend:dend }, function (data) { $('.target').html(data,function(){ $('table').dataTable(); }); }); } });
【问题讨论】:
标签: php jquery twitter-bootstrap datatables