javascript get state of checkbox code example
Example 1: how to make checkbox checked in html
<input type="checkbox" checked={props.completed} />
#for props completed is true/false , hence if completed is false then checkbox will not be clicked .
# if the checkbox is true it will be will be checked
Example 2: get the state of a checkbox
function checkAddress()
{
var chkBox = document.getElementById('checkAddress');
if (chkBox.checked)
{
// ..
}
}