Tôi có một bộ nút radio. Khi chính được chọn, trường Công ty chính bị ẩn. Tôi cũng muốn tại thời điểm này xóa lựa chọn thả xuống. Tôi có thể làm cái này như thế nào?Xóa lựa chọn thả xuống trên nút radio nhấp
<p>
<label>Company Type:</label>
<label for="primary"><input onclick="javascript: $('#sec').hide('slow');" type="radio" runat="server" name="companyType" id="primary" checked />Primary</label>
<label for="secondary"><input onclick="javascript: $('#sec').show('slow');" type="radio" runat="server" name="companyType" id="secondary" />Secondary</label>
<div id="sec">
<label for="primary_company">Primary Company:</label>
<%= Html.DropDownList("primary_company", Model.SelectPrimaryCompanies, "** Select Primary Company **") %>
</div>
</p>
+1. nhưng tại sao '.parent ('select');' một phần? Bạn chỉ có thể sử dụng '.end()', đúng không? –
@David - đó là một phần của chuỗi dài hơn để phục vụ mục đích xấu xa. (Tôi đã dán quá nhiều mã từ một trong các trang thử nghiệm của tôi), nhưng bây giờ bạn chỉ ra rằng, 'end' là tốt hơn so với' parent ('select') '. Cảm ơn. – karim79