3 check box Validation given below script - B M SOLUTION
  • 3 check box Validation given below script

     



    <script>

        $(document).ready(function () {


            var a=0;

            $("#Receipt_Zakat").click(function () {

                if ($(this).is(":checked")) {

                    a = a + 1;

                } else {

                    a = a - 1;

                }

            });

            $("#Receipt_Imdad").click(function () {

                if ($(this).is(":checked")) {

                    a = a + 1;

                } else {

                    a = a - 1;

                }

            });

            $("#Receipt_Sadqa").click(function () {

                if ($(this).is(":checked")) {

                    a = a + 1;

                } else {

                    a = a - 1;

                }

            });

            $("#save").click(function () {

                debugger;

                if (a>0) {

                    return true;

                } else {

                    alert('Please Check');

                    return false;

                }

            });

        });

    </script>

  • You might also like

    No comments :

    Post a Comment