February 28, 2012

How to set radio button status with JavaScript

Question by vinomarky

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

Answer by Starx

Very simple

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

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!