You can try either any of the ways preferred, as in jQuery
or JavaScript
.
Get the value as below and assign to the variable then you if-else
statements as per your requirement.
var getVal=$('#checkbox_id').is(":checked"); // jQueryvar getVal=document.getElementById("checkbox_id").checked //JavaScriptif (getVal==true) { // perform task} else { // perform task }