[問題] RadioButton選取disabled??

看板Web_Design作者 (kiy)時間13年前 (2012/08/04 09:45), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/1
各位前輩好,小弟寫ASP.NET遇到一的問題 有關JAVASCRIPT如下 function fncEnable() { if (RadioButton1.checked) { document.DropDownList1.disabled = false; document.DropDownList2.disabled = true; } else { document.DropDownList1.disabled = true; document.DropDownList2.disabled = false; } } 而HTML檔如下 <asp:RadioButton ID="RadioButton1" runat="server" Onclick="fncEnable()" GroupName="r"/> <asp:RadioButton ID="RadioButton2" runat="server" GroupName="r" /> <br /> <asp:DropDownList ID="DropDownList1" runat="server" > </asp:DropDownList> <asp:DropDownList ID="DropDownList2" runat="server" > </asp:DropDownList> 但是都沒有反應...請前輩不吝指教!!感謝~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.68.228.55

08/04 11:39, , 1F
.net的元件產生html之後id跟name會改變
08/04 11:39, 1F

08/05 14:05, , 2F
你的JavaScript 看起來很奇怪!
08/05 14:05, 2F
文章代碼(AID): #1G77wXDS (Web_Design)
文章代碼(AID): #1G77wXDS (Web_Design)