I have two radio buttons within an HTML form. A dialog box appears when one of the fields is null. How can I check whether a radio button is selected?
if(document.querySelectorAll('input[type="radio"][name="name_of_radio"]:checked').length < 1)