[英]how to display table shortcode with a drop-down list that depends on the selected option in another drop-down list
[英]How can I Hide Selected option from Drop-down list
我想通过 javascript 从下拉菜单中隐藏/显示选定的选项。
<select id="yselect" class="custom-select" size="3">
<option value="population">Population</option>
<option value="trafficHour">Average Traffic Hour</option>
<option value="grossIncome">Gross Annual Income</option>
</select>
您可以隐藏:
CSS
#yselect option:selected{
display:none;
}
jQuery
$('#yselect option:selected').hide();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.