Html:
Java代码
1.<table id="Table5" class="querytable" width="100%">
2. <tr>
3. <th>
4. <input name="chkall" value="1" style="width:25px; text-align:center;" type="checkbox" οnclick="CheckAll(this,'Item')"/>全选
5. </th>
6. <th>
7. 销售部门
8. </th>
9. <th>
10. 销售单号
11. </th>
12. <th>
13. 是否导出开票文本
14. </th>
15. <th>
16. 是否导入A6
17. </th>
18. </tr>
19.<asp:Repeater ID="rptUjlist" runat="server" >
20.<ItemTemplate>
21. <tr οnmοuseοver="c=this.style.backgroundColor;this.style.backgroundColor='#C2DFF7'"
22.οnmοuseοut="this.style.backgroundColor=c;"> <td>
23. <input name="Item" style="width:20px; text-align:center" type="checkbox" value='<%# Eval("ID") %>' />
24. </td>
25. <td id="Td1" runat="server">
26. <%# Eval("Tcbm")%>
27. </td>
28. <td>
29. <%# Eval("xsdh")%>
30. </td>
31. <td>
32. <%# Eval("sfdckp")%>
33. </td>
34. <td>
35. <%# Eval("sfdrA6")%>
36. <asp:HiddenField ID="hFNo" runat="server" Value=' <%# Eval("xsdh")%>' />
37. </td>
38. </tr>
39.</ItemTemplate>
40.</asp:Repeater>
41.</table>
<table id="Table5" class="querytable" width="100%">
<tr>
<th>
<input name="chkall" value="1" style="width:25px; text-align:center;" type="checkbox" οnclick="CheckAll(this,'Item')"/>全选
</th>
<th>
销售部门
</th>
<th>
销售单号
</th>
<th>
是否导出开票文本
</th>
<th>
是否导入A6
</th>
</tr>
<asp:Repeater ID="rptUjlist" runat="server" >
<ItemTemplate>
<tr οnmοuseοver="c=this.style.backgroundColor;this.style.backgroundColor='#C2DFF7'"
οnmοuseοut="this.style.backgroundColor=c;"> <td>
<input name="Item" style="width:20px; text-align:center" type="checkbox" value='<%# Eval("ID") %>' />
</td>
<td id="Td1" runat="server">
<%# Eval("Tcbm")%>
</td>
<td>
<%# Eval("xsdh")%>
</td>
<td>
<%# Eval("sfdckp")%>
</td>
<td>
<%# Eval("sfdrA6")%>
<asp:HiddenField ID="hFNo" runat="server" Value=' <%# Eval("xsdh")%>' />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
JS代码
Java代码
1.function CheckAll(e, itemname) {
2. var aa = document.getElementsByName(itemname);
3. if (aa == undefined) return;
4. for (var i = 0; i < aa.length; i++) aa[i].checked = e.checked;
5.}
function CheckAll(e, itemname) {
var aa = document.getElementsByName(itemname);
if (aa == undefined) return;
for (var i = 0; i < aa.length; i++) aa[i].checked = e.checked;
}
后台代码
Java代码
1.string str = Request.Form["Item"]
string str = Request.Form["Item"]
str就是获取的<%# Eval("ID") %>中绑定的值
Java代码
1.<table id="Table5" class="querytable" width="100%">
2. <tr>
3. <th>
4. <input name="chkall" value="1" style="width:25px; text-align:center;" type="checkbox" οnclick="CheckAll(this,'Item')"/>全选
5. </th>
6. <th>
7. 销售部门
8. </th>
9. <th>
10. 销售单号
11. </th>
12. <th>
13. 是否导出开票文本
14. </th>
15. <th>
16. 是否导入A6
17. </th>
18. </tr>
19.<asp:Repeater ID="rptUjlist" runat="server" >
20.<ItemTemplate>
21. <tr οnmοuseοver="c=this.style.backgroundColor;this.style.backgroundColor='#C2DFF7'"
22.οnmοuseοut="this.style.backgroundColor=c;"> <td>
23. <input name="Item" style="width:20px; text-align:center" type="checkbox" value='<%# Eval("ID") %>' />
24. </td>
25. <td id="Td1" runat="server">
26. <%# Eval("Tcbm")%>
27. </td>
28. <td>
29. <%# Eval("xsdh")%>
30. </td>
31. <td>
32. <%# Eval("sfdckp")%>
33. </td>
34. <td>
35. <%# Eval("sfdrA6")%>
36. <asp:HiddenField ID="hFNo" runat="server" Value=' <%# Eval("xsdh")%>' />
37. </td>
38. </tr>
39.</ItemTemplate>
40.</asp:Repeater>
41.</table>
<table id="Table5" class="querytable" width="100%">
<tr>
<th>
<input name="chkall" value="1" style="width:25px; text-align:center;" type="checkbox" οnclick="CheckAll(this,'Item')"/>全选
</th>
<th>
销售部门
</th>
<th>
销售单号
</th>
<th>
是否导出开票文本
</th>
<th>
是否导入A6
</th>
</tr>
<asp:Repeater ID="rptUjlist" runat="server" >
<ItemTemplate>
<tr οnmοuseοver="c=this.style.backgroundColor;this.style.backgroundColor='#C2DFF7'"
οnmοuseοut="this.style.backgroundColor=c;"> <td>
<input name="Item" style="width:20px; text-align:center" type="checkbox" value='<%# Eval("ID") %>' />
</td>
<td id="Td1" runat="server">
<%# Eval("Tcbm")%>
</td>
<td>
<%# Eval("xsdh")%>
</td>
<td>
<%# Eval("sfdckp")%>
</td>
<td>
<%# Eval("sfdrA6")%>
<asp:HiddenField ID="hFNo" runat="server" Value=' <%# Eval("xsdh")%>' />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
JS代码
Java代码
1.function CheckAll(e, itemname) {
2. var aa = document.getElementsByName(itemname);
3. if (aa == undefined) return;
4. for (var i = 0; i < aa.length; i++) aa[i].checked = e.checked;
5.}
function CheckAll(e, itemname) {
var aa = document.getElementsByName(itemname);
if (aa == undefined) return;
for (var i = 0; i < aa.length; i++) aa[i].checked = e.checked;
}
后台代码
Java代码
1.string str = Request.Form["Item"]
string str = Request.Form["Item"]
str就是获取的<%# Eval("ID") %>中绑定的值