-1
Hello! I have a question to get the input of a form, I already searched here and I found nothing, also not found in the documentation of JS or Bootstrap.
var yearStu = document.querySelector(".form-check-label").value;
alert(yearStu);
HTML:
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1">
<label class="form-check-label" for="inlineRadio1" value="1º Ano">1º Ano</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2">
<label class="form-check-label" for="inlineRadio2" value="2º Ano">2º Ano</label>
</div>
This query is only returning me "Undefined". -' I’m just a beginner, if you could give me a hand. Thank you
Thank you very much!
– dualreceiver
It was nothing :)
– LeAndrade