0

我更新了我的帖子,以便向您展示 html。顺便谢谢

我想单击提交按钮,这将使Radiobuttonlist淡出。我尝试了很多事情,但无法做到。

<div id="ctl00_ContentPlaceHolder1_UpdatePanel1">

                                                    <span>Looking at the image attached, what is the most likely diagnosis?</span>
                                                    <br />
                                                    <br />
                                                    <table id="ctl00_ContentPlaceHolder1_rbl_poll" border="0">
    <tr>
        <td><input id="ctl00_ContentPlaceHolder1_rbl_poll_0" type="radio" name="ctl00$ContentPlaceHolder1$rbl_poll" value="Item 1" /><label for="ctl00_ContentPlaceHolder1_rbl_poll_0">Item 1</label></td>
    </tr><tr>
        <td><input id="ctl00_ContentPlaceHolder1_rbl_poll_1" type="radio" name="ctl00$ContentPlaceHolder1$rbl_poll" value="Item 2" /><label for="ctl00_ContentPlaceHolder1_rbl_poll_1">Item 2</label></td>
    </tr><tr>
        <td><input id="ctl00_ContentPlaceHolder1_rbl_poll_2" type="radio" name="ctl00$ContentPlaceHolder1$rbl_poll" value="Item 3" /><label for="ctl00_ContentPlaceHolder1_rbl_poll_2">Item 3</label></td>
    </tr><tr>
        <td><input id="ctl00_ContentPlaceHolder1_rbl_poll_3" type="radio" name="ctl00$ContentPlaceHolder1$rbl_poll" value="Item 4" /><label for="ctl00_ContentPlaceHolder1_rbl_poll_3">Item 4</label></td>
    </tr>
</table>
                                                    <br />
                                                    <br />
                                                    <input type="submit" name="ctl00$ContentPlaceHolder1$btn_poll_submit" value="Button" onclick="fadePoll();" id="ctl00_ContentPlaceHolder1_btn_poll_submit" />

4

2 回答 2

0

您可以使用此代码

$("*[name$='ctl00$ContentPlaceHolder1$rbl_poll'").attr("disabled", "disabled");
于 2013-01-31T13:08:01.480 回答
0

我做了一些更改,现在我可以在 btn_poll_submit click 上看到它的淡出

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
    <ContentTemplate>
        <asp:RadioButtonList ID="rbl_poll" runat="server">
            <asp:ListItem>Item 1</asp:ListItem>
            <asp:ListItem>Item 2</asp:ListItem>
            <asp:ListItem>Item 3</asp:ListItem>
            <asp:ListItem>Item 4</asp:ListItem>
        </asp:RadioButtonList>

        <asp:Button ID="btn_poll_submit" runat="server" Text="Button" />
    </ContentTemplate>
</asp:UpdatePanel>

 <script type="text/javascript" language="javascript">    
     $(document).ready(function () {

         $("input[id$=btn_poll_submit]").click(function (e) {    
             $("table[id$='rbl_poll']").fadeOut();
             e.preventDefault();
         });
     });         
</script>
于 2013-01-31T13:12:35.017 回答