Não consigo verificar se o checkbox foi marcado
Salve! Não consigo verificar se o checkbox foi marcado, isso não faz o menor sentido porquê aparentemente eu fiz tudo certo.
HTML:
<div class="mt-4 mb-3 row ">
<label class="label_checkbox">Adicionar customização
<input type="checkbox" id="checkbox" name="custom_shirt">
<span class="checkmark"></span>
</label>
</div>
JAVASCRIPT:
let checkedCustomize = document.getElementById("checkbox");
if(checkedCustomize.checked){
alert("Checkbox marcado");
}else{
console.log("checkbox não marcado");
}Discussão (2)
Carregando comentários...