我更新了我的帖子,以便向您展示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" />
答案 0 :(得分:0)
您可以使用此代码
$("*[name$='ctl00$ContentPlaceHolder1$rbl_poll'").attr("disabled", "disabled");
答案 1 :(得分:0)
我做了一些更改,现在我可以在btn_poll_submit上看到它的淡出点击
<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>