zoukankan      html  css  js  c++  java
  • DataTabless Add rows

    参考官网案例:https://datatables.net/examples/api/add_row.html

    JS:

    $(document).ready(function() {

        var t = $('#example').DataTable();
        var counter = 1;
     
        $('#addRow').on( 'click'function () {
            t.row.add( [
                counter +'.1',
                counter +'.2',
                counter +'.3',
                counter +'.4',
                counter +'.5'
            ] ).draw( false );
     
            counter++;
        } );
     
        // Automatically add a first row of data
        $('#addRow').click();
     
    HTML:
     
    <table id="example" class="display" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <th>Column 1</th>
                    <th>Column 2</th>
                    <th>Column 3</th>
                    <th>Column 4</th>
                    <th>Column 5</th>
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <th>Column 1</th>
                    <th>Column 2</th>
                    <th>Column 3</th>
                    <th>Column 4</th>
                    <th>Column 5</th>
                </tr>
            </tfoot>
        </table>
     
     
    CSS:
     
  • 相关阅读:
    MongoDB存储
    python 查看文件名和文件路径
    Python遍历文件个文件夹
    Python图片缩放
    python opencv
    Python3 关于UnicodeDecodeError/UnicodeEncodeError: ‘gbk’ codec can’t decode/encode bytes类似的文本编码问题
    jmter使用
    HttpRunnerManager使用
    PostMan使用
    工作中的思想
  • 原文地址:https://www.cnblogs.com/sdream/p/5368267.html
Copyright © 2011-2022 走看看