<form id="form1" runat="server">
<div>
<asp:RadioButtonList ID="re" runat="server" AutoPostBack="false" RepeatDirection="Horizontal" onclick="javascript:DeSelectAll()">
<asp:ListItem Text="One" Value="1"></asp:ListItem>
<asp:ListItem Text="Two" Value="2"></asp:ListItem>
<asp:ListItem Text="Three" Value="3"></asp:ListItem>
</asp:RadioButtonList>
<asp:Label ID="lblmessage" runat="server"></asp:Label>
<script type="text/javascript">
var allRadios = document.getElementsByName('re');
var booRadio;
var x = 0;
for (x = 0; x < allRadios.length; x++) {
allRadios[x].onclick = function () {
if (booRadio == this) {
this.checked = false;
booRadio = null;
} else {
booRadio = this;
}
};
}
</script>
</div>
</form>
No comments:
Post a Comment