<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$("#demo").live("click", function () {
var selectedItems = $("[id*=CheckBoxList1] input:checked");
if (selectedItems.length > 0) {
for (var i = 0; i < selectedItems.length; i++)
alert("Selected Text: " + selectedItems.eq(i).next().html() + " Selected Index: " + selectedItems[i].name.split("$")[selectedItems[i].name.split("$").length - 1]);
} else {
alert("Please select an item.");
}
});
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:CheckBoxList ID="CheckBoxList1" runat="server">
<asp:ListItem Text="One" Value="1" />
<asp:ListItem Text="Two" Value="2" />
<asp:ListItem Text="Three" Value="3" />
</asp:CheckBoxList>
<br />
<input type="button" id="demo" value="Demo" />
</form>
</body>
</html>