Check checkbox before clicking button

Posted by Akiii under jQuery category on | Points: 40 | Views : 1440

<input id="chkTermsAndCondition" type="checkbox" /><br/><br/>
<asp:Button ID="btnCheckOut1" runat="server" Text="COMPLETE ORDER" OnClientClick="return CheckTerms();"/>

<script type="text/javascript">
function CheckTerms() {
if ($('#chkTermsAndCondition').is(':checked')) {
return true;
else {
alert("Please accept the terms and conditions !");
return false;

Thanks and Regards

Comments or Responses

Login to post response