我需要显示在一个选择删除/隐藏选项下依赖于另一个下拉列表的选择的选项。的jQuery/JavaScript的隐藏和显示元件依赖下拉列表
我的意思是,当我选择“其他”,然后会显示在花药下拉名单(男&女)!然后 当我选择“MR。工程师”将只显示“男” ,当我选择“小姐。工程师”,那么将只显示“女性”。
<select>
<option value="">Choose</option>
<option value="Mr">Mr. Engineer</option>
<option value="Miss">Miss. Engineer</option>
<option value="other">Other</option>
</select>
<select>
<!--Below shows when 'Other' is selected , and show otherwise-->
<option value="0">choose</option>
<!--Below shows when 'Mr. engineer' is selected jsut , and hidden otherwise-->
<option value="male">Male</option>
<!--Below shows when 'Miss. engineer' is selected just, and hidden otherwise-->
<option value="female">Female</option>
</select>
**我的意思是,当我选择“其他”,然后会显示在花药下拉 完整列表(女性及男性)! 当我选择“MR。工程师”,那么将显示一个男只是 等。 。 。 ** – 2013-03-16 13:07:04
相应地编辑了答案,也检查了更新后的演示。 – techfoobar 2013-03-16 13:49:00