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>
const cb = document.getElementById('accept');
console.log(cb.checked);
Also in JavaScript:
- javascript casting objects
- jquery set checkbox checked unchecked
- clear canvas content jquery
- react createElement interactive button
- object literal javascript
- prototype chain in javascript
- back press subscriptions i is not a function react native
- javascript clone array of objects
- hidden jquery
- location.reload sweetalert
- devexpress custom column field
- get common values from two arrays javascript
- base64 decode javascript
- js window location relative path
- afficher une variable dans la console javascript
- how to get MAC id of nodemcu
- error message remove after checkbox fill in jquery
- statusbar.sethidden(true) in react native
- jquery hasclass multiple classes
- js local storage delete key
- js get last element of array
- js outputting data
- knex referenced column 'id' in foreign key constraint 'ponto_items_pt_id_foreign' are incompatible.
- useRef