本文介绍了验证单选按钮列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<tr>
    <td>
        <asp:Label ID="Label2" runat="server" Text="SEX"></td>
    <td style="width: 203px">
        <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal">
        <asp:ListItem>MALE
        <asp:ListItem>FEMALE

    </td>
</tr>



我想使用javascripts来验证RadioButtonList的上述详细信息...可以有人帮助我....



i want to validate a RadioButtonList using javascripts for the above details... can any one able to assist me....

推荐答案

<script language="javascript" type="text/javascript">
    function validate()
    {
    if (document.getElementById("RadioButtonList1").checked==false)
    {
    var answer = confirm ("Please confirm selection...")
    if (answer)
    return true;
    else
    return false;
    }
    return true;
    }
    </script>




请参阅....
使用javascript验证单选按钮 [ ^ ]




Refer this....
validation of radiobutton using javascript[^]



function validate()
{
    var selected =


这篇关于验证单选按钮列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 01:17