Add adjustable column width feature to table

1. Introduce js frame package

   < script src= "js/jquery-1.8.0.min.js" type= "text/javascript"> </ script>

  < script src= "js/colResizable-1.6.js" type= "text/javascript"> </ script> (this jar package is to add column width customization function

to the table) 2. Table page content

  <table id="contentTable"
  class="table table-striped table-bordered table-condensed">
    <thead>
      <tr>
        <th>标题</th>
        <th>类型</th>
        <th class="sort-column login_name">状态</th>
        <th class="sort-column name">查阅状态</th>
        <th>更新时间</th>
     </tbody>
  </table>

 

 4. js code

  <script type="text/javascript">

    $(function() {

       $("table").colResizable();

     });

  </script>

 In this way, add the table style to your form, and your form can be customized to pull up the size. 

4. Attach the official website address

  jQuery plugin to resize table columns

 

  Official website address: http://www.bacubacu.com/colresizable/

 

ColResizable-1.6 plugin download address: https://download.csdn.net/download/oranxiaoluo/10352596

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324443538&siteId=291194637