SyntaxFix
Write A Post
Hire A Developer
Questions
Use document.querySelector() if you want to avoid frameworks (which I almost always want to do).
document.querySelector('input[name="gender"]:checked').value