333.How do you get the status of a checkbox? the id attribute is missing in input tag.
#162
<input type="checkbox" id="checkboxname" value="Agree" /> Agree the
conditions<br />
console.log(document.getElementById('checkboxname').checked);
It's giving error for the original question so changed the name attribute to id attribute or we can add id attribute only and leave the name attribute as it is.
333.How do you get the status of a checkbox? the id attribute is missing in input tag. #162
It's giving error for the original question so changed the name attribute to id attribute or we can add id attribute only and leave the name attribute as it is.