Check Terms and Conditions Checkbox Checked or Not Using jQuery Validation

Check Terms & Condition

 JQuery Validation for terms and conditions checkbox checked or not  check Terms and Conditions checkbox selected or not using jQuery or restrict user to accept terms and conditions using jQuery.

If  Checked Checkbox  After  Control  to Agreed  Terms and Conditions.

if  Not Checked  checkbox Control  to Not Agreed  Terms and Conditions.


  JQuery Coding

 <html xmlns="">

     <%--  Terms Condition  JQuery Coding Start--%>

    <script type="text/javascript" src=""></script>
    <script type="text/javascript">
        $(function () {
            $('#btnSave').click(function () {
                if ($('#ChkTermsCondition').is(':checked')) {
                    alert('Your Agreed Terms & Conditions')
                else {
                    alert('please check terms & conditions')

        <%--  Terms Condition  JQuery Coding End--%>

    <form id="form1" runat="server">

                <asp:Label ID="Label1" runat="server" Text="Name"></asp:Label>
                    <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                <asp:Label ID="Label2" runat="server" Text="Mobile"></asp:Label>
                    <asp:TextBox ID="txtMobile" runat="server"></asp:TextBox>
            <tr><td> Check Status:</td><td>
                <asp:CheckBox ID="ChkTermsCondition" runat="server" />
          Agree Terms & Conditions</td></tr>
            <tr><td></td><td><asp:Button ID="btnSave" runat="server" Text="Check"  />


First - Add Web Form - Select  Labels & Textboxes & Chexkbox & Button

Name - Textbox Id change (required).

Next  -  CheckBox Id  Name Change (Required)

Next - Change Button Id(Required)

Next  - JQuery   Coding for  Check Terms & Conditions 

Next - Coding for  Labels & Textboxes & CheckBoxes


Next - F5 Run the WebForm -  Click the Check Button & UnSelect CheckBox

PopUp Show  - Check the Terms & Conditions

Next - Click the Check Button & Select  CheckBox

PopUp Show Agreed  Terms & Condition



Post a Comment