Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery [快速搜索]如何确定显示的行数?_Jquery_Tablesorter_Quick Search - Fatal编程技术网

Jquery [快速搜索]如何确定显示的行数?

Jquery [快速搜索]如何确定显示的行数?,jquery,tablesorter,quick-search,Jquery,Tablesorter,Quick Search,我将jQuery与TableSorter和QuickSearch插件一起使用。这些很好用 我怎样才能: 动态显示每个显示行的行号 在我的页面的某个地方,显示显示的行总数 请给出页面上可见的行数 大致如下: var rowCount = $('tr:visible').length; $('#rowCountDiv').html(rowCount + "rows"); 将数字写入页面上id为rowCountDiv的div中,这是正确的答案。在PHP中,请使用以下内容: echo "Dynam

我将jQuery与TableSorter和QuickSearch插件一起使用。这些很好用

我怎样才能:

  • 动态显示每个显示行的行号

  • 在我的页面的某个地方,显示显示的行总数

  • 请给出页面上可见的行数

    大致如下:

     var rowCount = $('tr:visible').length;
     $('#rowCountDiv').html(rowCount + "rows");
    

    将数字写入页面上id为
    rowCountDiv

    的div中,这是正确的答案。在PHP中,请使用以下内容:

    echo "Dynamic count: <p id=\"count\"></p>";
    
    瞧!现在您有了一个动态计数,每当搜索表时它都会更新

    echo "Dynamic count: <p id=\"count\"></p>";
    
    onAfter: function() {
        document.getElementById("count").innerHTML=($('tr:visible').length-1);
    }