Here is a simple function that’ll solve the problem and works in most of the browsers.
It's also very precise, as you can point out the exact field where there's a problem.
We're going to be checking the form using a function, which will be activated by the form's Validating this form would be considerably simpler than one containing radio buttons or select boxes, but any form element can be accessed.
When you are asking a reader for their email address, you can use a simple » address validation function to make sure the address has a valid structure. Each option in a drop-down box is indexed in the array Annoyingly, there is no simple way to check which radio button out of a group is selected — you have to check through each element, linked with Boolean AND operators .