首页 > bootstrap table 导出有问题

bootstrap table 导出有问题

我点了导出之后的反应是

页面的代码是:

<!DOCTYPE html>
<html>
<head>
    <title>Export</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="css/bootstrap.css">
    <link rel="stylesheet" href="css/bootstrap-table.css">
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.js"></script>
    <script src="js/bootstrap-table.js"></script>
    <script src="js/bootstrap-table-export.js"></script>
      <script src="js/tableExport.js"></script>
    <script src="js/ga.js"></script>
</head>
<body>
    <div class="container">
        <h1>Export</h1>
        <div id="toolbar">
            <select class="form-control">
                <option value="">Export Basic</option>
                <option value="all">Export All</option>
                <option value="selected">Export Selected</option>
            </select>
        </div>
        <table id="table"
               data-toggle="table"
               data-show-export="true"
               data-pagination="true"
               data-click-to-select="true"
               data-toolbar="#toolbar"
               data-url="json/data1.json">
            <thead>
            <tr>
                <th data-field="state" data-checkbox="true"></th>
                <th data-field="id">ID</th>
                <th data-field="name">Item Name</th>
                <th data-field="price">Item Price</th>
            </tr>
            </thead>
        </table>
    </div>
<script>
    var $table = $('#table');
    $(function () {
        $('#toolbar').find('select').change(function () {
            $table.bootstrapTable('refreshOptions', {
                exportDataType: $(this).val()
            });
        });
    })
</script>
</body>
</html>

基本就是从官网的例子中那过来,为什么不行呢
控制台未有信息报错.
就是导不出来.
当然我这个是放在我自己的项目中的.
除此之外,好像没什么地方不一样的啦

PS:
后来花了大量的时间,终于解决.
把我原来的tableExport.js
替换成<script src="//rawgit.com/hhurz/tableExport.jquery.plugin/master/tableExport.js"></script>
这地址上的js就好了..
什么狗屎的问题.
重新下载的,比我之前的多了几行代码,
估计是作者修复bug了...

【热门文章】
【热门文章】