Javascript jsp:使用jQuery收集所有选中的复选框

Javascript jsp:使用jQuery收集所有选中的复选框,javascript,jquery,jsp,Javascript,Jquery,Jsp,我不熟悉jQuery和jsp,jstl,很抱歉这个可能很琐碎的问题。我在jsp中有以下代码: <ct:thead> <ct:th> <ct:checkbox styleClass="toggleCheckbox"/> </ct:th> <ct:th><ct:message messageKey="documentID"/></ct:th> 呈现的html如下所示:

我不熟悉jQuery和jsp,jstl,很抱歉这个可能很琐碎的问题。我在jsp中有以下代码:

  <ct:thead>
    <ct:th>
      <ct:checkbox styleClass="toggleCheckbox"/>
    </ct:th>
    <ct:th><ct:message messageKey="documentID"/></ct:th> 

呈现的html如下所示:

<tr>
    <td>
        <span class="checkboxGroup">
            <input type="checkbox">
        </span>
        <input name="documentID" type="hidden" value="6">
    </td>
    <td>6</td>

6.
我想收集使用jQuery选择的所有
documentID
s。看起来怎么样?提前谢谢

您可以使用基于名称属性值进行选择

$('[name="documentID"]')
$('[name=“documentID”]')。每个(函数(){
console.log(this.value);
})

6.

共享呈现的html输出请发送完整的代码以便查看。@PranavCBalan,我添加了呈现的html。请看一看