许松--永恒学习屋
努力并不一定会成功,但放弃一定会失败!
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='<%# Eval("Text")%>' />
posted on 2010-11-22 15:15  yongheng's blogs  阅读(312)  评论(0编辑  收藏  举报