我有一个包含多行的表,具有公共(public)自定义属性 prId 。我怎样才能查出没有。具有相同自定义属性的行。我不能使用jquery
<tr id="mainRow2" prId = "2"></tr>
<tr id="subRow2_1" prId = "2"></tr>
<tr id="subRow2_2" prId = "2"></tr>
<tr id="subRow2_3" prId = "2"></tr>
<tr id="mainRow5" prId = "5"></tr>
<tr id="subRow5_1" prId = "5"></tr>
<tr id="subRow5_2" prId = "5"></tr>
<tr id="subRow5_3" prId = "5"></tr>
<tr id="subRow5_4" prId = "5"></tr>
最佳答案
关于javascript - 在javascript中查找具有相同自定义属性的元素数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18502963/