-2
Hello, I’m trying to get that by pressing the checkbox written "Yes", enable the send button. But I can only do that if I hit the "No" button too.
Follow the HTML code:
<label>Sim</label>
<input type="checkbox" id="sim" name="sim" ng-model="sim" required>
<label>Não</label>
<input type="checkbox" id="nao" name="nao" ng-model="nao" required>
Follows the script:
<script>
let mudar = document, [inputs, validar] = [
mudar.querySelectorAll('[type="checkbox"]'),
mudar.querySelector('#btnsend')]
validar.disabled = true
for (i = 0; i < inputs.length; i++) {
inputs[i].addEventListener('input',() => {
let values = []
inputs.forEach(v => values.push(v.value))
validar.disabled = values.include('')
})
}
</script>
Please clarify your specific problem or provide Additional Details to Highlight Exactly what you need. As it’s Currently Written, it’s hard to Tell Exactly what you’re asking.
–