<i id='MQLa5'><tr id='MQLa5'><dt id='MQLa5'><q id='MQLa5'><span id='MQLa5'><b id='MQLa5'><form id='MQLa5'><ins id='MQLa5'></ins><ul id='MQLa5'></ul><sub id='MQLa5'></sub></form><legend id='MQLa5'></legend><bdo id='MQLa5'><pre id='MQLa5'><center id='MQLa5'></center></pre></bdo></b><th id='MQLa5'></th></span></q></dt></tr></i><div id='MQLa5'><tfoot id='MQLa5'></tfoot><dl id='MQLa5'><fieldset id='MQLa5'></fieldset></dl></div>

          <bdo id='MQLa5'></bdo><ul id='MQLa5'></ul>
      1. <small id='MQLa5'></small><noframes id='MQLa5'>

      2. <tfoot id='MQLa5'></tfoot><legend id='MQLa5'><style id='MQLa5'><dir id='MQLa5'><q id='MQLa5'></q></dir></style></legend>

        layui table 怎么好获取ID 为 table1 表格的主体高度

        时间:2023-11-01
            <tfoot id='AZHu0'></tfoot>
          • <legend id='AZHu0'><style id='AZHu0'><dir id='AZHu0'><q id='AZHu0'></q></dir></style></legend>

            <small id='AZHu0'></small><noframes id='AZHu0'>

            • <bdo id='AZHu0'></bdo><ul id='AZHu0'></ul>

                    <tbody id='AZHu0'></tbody>
                  <i id='AZHu0'><tr id='AZHu0'><dt id='AZHu0'><q id='AZHu0'><span id='AZHu0'><b id='AZHu0'><form id='AZHu0'><ins id='AZHu0'></ins><ul id='AZHu0'></ul><sub id='AZHu0'></sub></form><legend id='AZHu0'></legend><bdo id='AZHu0'><pre id='AZHu0'><center id='AZHu0'></center></pre></bdo></b><th id='AZHu0'></th></span></q></dt></tr></i><div id='AZHu0'><tfoot id='AZHu0'></tfoot><dl id='AZHu0'><fieldset id='AZHu0'></fieldset></dl></div>
                1. 可以通过 table.reload 方法中的参数 done 回调函数来获取到表格主体的高度。示例代码如下:
                  layui.use('table', function(){
                    var table = layui.table;
                    //执行渲染
                    table.render({
                      elem: '#table1',
                      url: '/demo/table/user/',
                      cols: [[
                        {field:'id', title:'ID', width:80},
                        {field:'username', title:'用户名', width:120},
                        {field:'email', title:'邮箱', minWidth:150},
                        {field:'sex', title:'性别', width:80, sort:true},
                        {field:'city', title:'城市', width:100},
                        {field:'sign', title:'签名', minWidth:150},
                        {field:'status', title:'状态', width:80, templet: '#statusTpl', unresize: true},
                        {field:'experience', title:'积分', width:80, sort: true},
                        {field:'score', title:'评分', width:80, sort: true},
                        {field:'classify', title:'职业', width:100},
                        {field:'wealth', title:'财富', width:135, sort: true},
                      ]],
                      done: function(res, curr, count){
                        var bodyHeight = $('.layui-table-main').height(); //获取表格主体的高度
                        console.log("表格主体的高度为:" + bodyHeight);
                      }
                    });
                    
                  });
                   
                  上一篇:layui.open 通过get和post方式提交数据 下一篇:没有了

                  相关文章

                  <i id='ykdvJ'><tr id='ykdvJ'><dt id='ykdvJ'><q id='ykdvJ'><span id='ykdvJ'><b id='ykdvJ'><form id='ykdvJ'><ins id='ykdvJ'></ins><ul id='ykdvJ'></ul><sub id='ykdvJ'></sub></form><legend id='ykdvJ'></legend><bdo id='ykdvJ'><pre id='ykdvJ'><center id='ykdvJ'></center></pre></bdo></b><th id='ykdvJ'></th></span></q></dt></tr></i><div id='ykdvJ'><tfoot id='ykdvJ'></tfoot><dl id='ykdvJ'><fieldset id='ykdvJ'></fieldset></dl></div>

                      <small id='ykdvJ'></small><noframes id='ykdvJ'>

                    1. <legend id='ykdvJ'><style id='ykdvJ'><dir id='ykdvJ'><q id='ykdvJ'></q></dir></style></legend>
                      <tfoot id='ykdvJ'></tfoot>

                      • <bdo id='ykdvJ'></bdo><ul id='ykdvJ'></ul>