Now check a checkbox is checked or not use jQuery:
Follow example code:
<script type="text/javascript"> $(document). ready(function(){ $('input[type="checkbox"]'). click(function(){ if($(this). is(":checked")){ alert("Checkbox is checked." ); }else if($(this). is(":not(:checked)")){ alert("Checkbox is unchecked." ); } } } </script>
Use jQuery CDN link for working with jQuery.
Question and answer is powered by AnsPress.io