checkbox 全选
<asp:Repeater ID="GridView1" runat="server">
<HeaderTemplate>
<tr>
<th scope="col">
<input id="all" type="checkbox" name="all" onclick="check_all(this,'checkid');" />
</th><th scope="col">订单号</th><th scope="col">下单日期</th><th scope="col">订单详情</th><th scope="col">销售等级</th><th scope="col">订单状态</th><th scope="col"> </th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<input id="checkbox" runat="server" type="checkbox" value="" />
<script type="text/javascript">
function check_all(obj,cName)
{
// var checkboxs = document.getElementsByName(cName);
//
// for(var i=0;i<checkboxs.length;i++){checkboxs[i].checked = obj.checked;}
//
var check=document.getElementsByTagName("input");
var allbl;
var k=0;
for(var i=0;i<check.length;i++)
{
if(check[i].type=="checkbox")
{
if(k==0)
{
k++;
allbl=check[i].checked;
}
check[i].checked=allbl;
}
}
}
</script>