How can I get a true or false from a checkbox in a form?
I want to do this without jQuery
I tried to get it with getElementById but it does not give anything.
<p class="yellow"><input type="checkbox" id="accept">Ik accepteer</p>
function required() {
var checkPrivacy = document.getElementById("accept").innerHTML
alert(checkPrivacy)
if (checkPrivacy == false)
{
alert("Option 1");
} else {
alert("Option 2")
}
}