Hi , Try this practical example..
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script type="text/javascript">
var alertradio = function () {
var rb = document.getElementById("<%=rb.ClientID%>");
var inputs = rb.getElementsByTagName('input');
var flag = false;
var selected;
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].checked) {
selected = inputs[i];
flag = true;
break;
}
}
if (flag)
alert(selected.value);
else
alert('Please select an option');
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:RadioButtonList ID="rb" runat="server">
<asp:ListItem Text="one" />
<asp:ListItem Text="two" />
<asp:ListItem Text="three" />
<asp:ListItem Text="four" />
</asp:RadioButtonList>
<asp:Button ID="btn" runat="server" Text="Test" OnClientClick="alertradio(); return false;" />
</form>
</body>
</html>