当用户选择特定选项时,我需要显示一些选项。我想隐藏name =“products”中的一些选项,比如过滤器:
<select name="category">
<option value="fruit">fruits</option>
<option value="meal">meals</option>
<option value="drink">drinks</option>
</select>
<select name="products"><!--Always visible-->
<option default selected>select an option</option><!--when fruit is selected-->
<option id="fruit" value="apple">apple</option>
<option id="fruit" value="orange">orange</option><!--when meal is selected-->
<option id="meal" value="chicken">chicken</option>
<option id="meal" value="beef">beef</option><!--when drink is selected-->
<option id="drink" value="vodka">vodka</option>
<option id="drink" value="wishkey">wishkey</option>
</select>
我需要有关如何使用javascript或Jquery的帮助。