Categories




PreviousNext
To get radio button selected value using Javascript    
 Send mail Views:548
Belongs to : Javascript
Facebook Bookmarkbookmark this pageStumbleupon Bookmark 

In order to get the value of a radio button using JavaScript, we need to loop through all the radio buttons in that set and then find out the value of the radio button which is checked.

Example:

1
2
3
4



You have to use the following code to retrieve radio button selected value,
for (var i=0; i < document.frm.choice.length; i++) {
if (document.frm.choice[i].checked) {
var radiovalue = document.frm.choice[i].value;
break;
}
}


funny pictures and videos
funny pictures and videos
online games
embed code


By - Rekha, On - 2010-03-12
Send This
PreviousNext

User Comments


Add NEW Feedback:

Name :     Email :

Website Monitoring Web hosting by Hiox India Contact Us   Privacy Policy   Terms and Conditions