SyntaxFix
Write A Post
Hire A Developer
Questions
Today, in the year 2016, it is save to use document.querySelector without knowing the ID (especially if you have more than 2 radio buttons):
document.querySelector
document.querySelector("input[name=main-categories]:checked").value