【发布时间】:2011-06-16 18:55:11
【问题描述】:
可能重复:
jQuery disable SELECT options based on Radio selected (Need support for all browsers)
我有两个单选按钮
<html>
<input type="radio" class="status" name="status" checked="checked" value="New" />New
<input type="radio" class="status" name="status" value="Used" />Used
<select id="Insurance_type">
<option>Home Used Insurance1</option>
<option>Home New Insurance1</option>
<option>Home Used Insurance2</option>
<option>Home New Insurance2</option>
</select>
</html>
当我选择新建单选按钮时,我需要一个 Jquery 脚本,它将过滤下拉列表。我将只有新的保险类型。
【问题讨论】:
-
您要过滤下拉列表或选项吗?
-
我需要过滤下拉列表中的值:例如,如果我选中 New,我应该有 Home New Insurance1 和 Home New Insurance 2
标签: javascript jquery