Showing posts with label get value from RadioButtonList control in java script. Show all posts
Showing posts with label get value from RadioButtonList control in java script. Show all posts

Thursday 19 January 2012

get value from RadioButtonList control in java script


How to get value from RadioButtonList control?

Here id is the name property of the RadioButtonList

function GetRadioButtonValue(id)

        {

            var radio = document.getElementsByName(id);

            for (var ii = 0; ii < radio.length; ii++)

            {

                if (radio[ii].checked)

                    alert(radio[ii].value);

            }

        }