checked javascript code example
Example 1: how to check if input is checked javascript
const cb = document.getElementById('accept');
console.log(cb.checked);
Example 2: html checkbox status
app.innerHTML = '<h1>Hello, world!</h1>';
const cb = document.getElementById('accept');
console.log(cb.checked);
app.innerHTML = '<h1>Hello, world!</h1>';