datalist中radiobutton单选的问题

javascript代码:
<script language="javascript" type="text/javascript">
function clickit() {
        var dom=document.all;
        var el=event.srcElement;
        if(el.tagName=="INPUT"&&el.type.toLowerCase()=="radio")
        {
                for(i=0;i<dom.length;i++)
                {
                        if(dom[i].tagName=="INPUT"&&dom[i].type.toLowerCase()=="radio")
                        {
                                dom[i].checked=false;
                        }
                }
        }
        el.checked=true;
}
</script>

单选按钮的代码如:
<asp:RadioButton ID="RadioButton1" runat="server" onclick="clickit();"
                 Text='<%# DataBinder.Eval(Container.DataItem, "CARD_NBR")%>' />
posted @ 2009-01-19 13:18  80' 开发  阅读(489)  评论(0编辑  收藏  举报