Follow by Email

Tuesday, 30 April 2013

How to perform event on Checkbox check/uncheck using Jquery

<script>
$(document).ready(function(){

            $("#<%=chkShowNames.ClientID %>").click(function () {
               
                var checked = $(this).attr('checked');
                ;
                if (checked) {
                    alert("Checked");
                }
                else {
                    alert("Un CHecked");
                }
            });

});
</script>

<asp:CheckBox ID="chkShowNames" runat="server" Text="Show Names"></asp:CheckBox>

0 comments:

Post a Comment


                                                            

 
Design by Abhinav Ranjan Sinha