添加editable到bootstrap表

yay*_*zis 2 javascript twitter-bootstrap bootstrap-table

我尝试使用bootstrap表可编辑.在我的jsp页面中,我有:

<div class="row mystyle" >
  <div class="col-md-10">
   <table id="mytable" class="table table-hover" id="table-pagination"
                       data-url="data.json" 
                       data-toggle="table"
                       data-pagination="true"
                       data-show-pagination-switch="true"
                       data-sort-order="desc" 
                       data-show-export="true" 
                       data-search="true" 
                       data-show-toggle="true"  
                       data-show-refresh="true" 
                       data-show-columns="true"
                       data-page-list="[10, 25, 50, 100, ALL]">

      <thead>
        <tr>
         <th data-field="id" data-align="center">id</th>
         <th data-field="type" data-align="center">type</th>
         <th data-field="quantity" data-align="right" data-sortable="true">cost</th> 
        </tr>
      </thead>
  </table>
</div>            
Run Code Online (Sandbox Code Playgroud)

我的桌子很棒.现在我想添加可编辑的方法.我添加了<script src="assets/js/bootstrap-table-editable.js"></script>然后如何?我不清楚(我是新手..),我如何继续..

wen*_*nyi 7

您需要添加该bootstrap-editable.js文件,因为我们的扩展名基于x-editable示例:source.

还有其他的例子也许可以帮助你: demo1的, DEMO2, demo3文档.