How do I check if a radio button is selected or not, for example, if the page loads with the radio button selected, then I want to perform a task. I also want to perform the same task if the radio button is selected after the page is loaded.

I'm no javascript pro, so don't get too technical with me