JS 循环获取Repeater 中Checkbox1被选中的值
function print() { var temp=document.getElementsByName('checkboxx'); for(var i=0;i<temp.length;i++){ if(temp[i].checked==true){ alert(temp[i].value); } } } <a title="打印单据" onclick="print();" class="tools_btn"><span><b style="background: url(/images/btn/printer.png) 50% 4px no-repeat;">打印</b></span></a> <asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate> <tr > <td> <input id="Checkbox1" type="checkbox" name="checkboxx" value='<%#Eval("order_id")%>' /> </td> </tr> </ItemTemplate> </asp:Repeater>