
what is the method to check if the checkbox is checked or not?

Javascript check whether checkbox is checked or not
<html>
<script>
function check(){
var ch=document.getElementById('check');
if(ch.checked){
alert("Checkbox is checked");
}
else{
alert("Checkbox is not checked");
}
}
</script>
<input type="checkbox" id="check"><br>
<input type="button" value="check" onclick="check();">
</html>