gpt4 book ai didi

javascript - 获取表行中多个值的总数

转载 作者:行者123 更新时间:2023-12-03 12:18:58 25 4
gpt4 key购买 nike

我使用doctrine和php从mysql表中查询数据。我的表看起来像这样 完全的 逾期 进行中

我正在使用一些代码将数据呈现到表中。我的问题是是否可以使用 Javascript 来获取每行的总数?这是包含一些数据的完整表 enter image description here

我想统计“已完成”、“逾期”、“正在进行”列中的数据。用Javascript可以吗?

最佳答案

您只需计算每列中已完成/逾期或正在进行的“,”数量即可

您可以使用此代码查找 javascript 中特定字符的出现次数

var temp = "This is a string. is";

// the g in the regular expression says to search the whole string
// rather than just find the first occurrence
var count = temp.match(/is/g);
alert(count.length);

关于javascript - 获取表行中多个值的总数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24528883/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com