Contents tagged with code

  • How to access Radio Button List in the Javascript

                    // ***** First Method *****//
                    var rdolist = document.getElementsByName("rdolist");
                    
                    if (rdolist[1].checked)
                        txtMessage.value = "First";
                    if (rdolist[2].checked)
                        txtMessage.value = "Second";
                    if (rdolist[3].checked)
                        txtMessage.value = "Third";