简体   繁体   English

计算过滤表中的行

[英]Count row in filtered table

I can count the total of rows in my table with the code bellow.我可以使用下面的代码计算表中的总行数。
How can I count the number of rows displayed when I apply a filter?如何计算应用过滤器时显示的行数?

  var x = document.getElementById("userTbl").rows.length;
  document.getElementById("demo").innerHTML = "Found " + x + " rows in the table.";
}

您应该在应用过滤器后立即再次调用该函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM