Html – How can I validate a radio input with JavaScript?
I have a problem, I want to validate a input type="radio" with vanilla JavaScript (probably using document.getElementById()), based on ECMAScript. How do I do it? Here is my HTML: <div class="gender-input"> <input type="radio" name="gender" id="male"> <label for="male">Male</label> </div> <div class="gender-input">…