vinomarky vinomarky - 9 months ago 52
Javascript Question

How to set radio button status with JavaScript

What method would be best to use to selectively set a single or multiple radio button(s) to a desired setting with JavaScript?

Answer

Very simple

radiobtn = document.getElementById("theid");
radiobtn.checked = true;