TomC
0
Q:

check if not checked vanila js

<input type="checkbox" id="check">
<a href="#" onclick="check()">click</a>
<button onclick="check()">button</button>
<script>
 function check() {
    		if (document.getElementById('check').checked) {
            alert("checked");
        } else {
            alert("Not checked.");
        }
       
    }

</script>
0

New to Communities?

Join the community