HTML Code:
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script type="text/javascript">
var checkItem=function(index)
{
if(index==1)
{
$("#chkCRREQ :checkbox").each(function(){$(this).attr("checked",true);});
}
else
{
$("#chkCRREQ :checkbox").each(function(){$(this).attr("checked",false);});
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width:100%;" border="1">
<tr>
<td colspan="3" align="center" style="font-size:larger;">CRREQ</td>
</tr>
<tr>
<td colspan="3">
<input id="btnSelect" type="button" onclick="checkItem(1)" value="select all" />
<input id="btndeselect" type="button" onclick="checkItem(2)" value="deselect all" />
</td>
</tr>
<tr>
<td>
<asp:CheckBoxList ID="chkCRREQ" runat="server" RepeatColumns="3" RepeatDirection="Horizontal" Width="100%">
</asp:CheckBoxList>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>