which button you are using
asp:button or
HTMLInput. check the following code
div id="div1">
<asp:checkbox runat="server" id="checkbox1" text="blah">
<asp:button runat="server" onclientckick="return ischecked(checkbox1)" text="click">
</div>
<div id="div2">
<asp:checkbox runat="server" id="checkbox2" text="blah">
<asp:button runat="server" onclientckick="return ischecked(checkbox2)" text="click">
</div>
in Javascript
function ischecked(objID)
{
var chk = document.getElementById(objId);
if(!chk.checked)
{
alert("Please check Terms and Condition checkbox");
return false;
}
else
{
if (!(confirm("Are you sure want to submit")))
{
alert("you have clicked Cancel");
return false;
}
}
}