@For Each myItem In Data
@<option style="display: none; " value="@myItem.dataCode" child="@myItem.dataCodeChild" >
@myItem.dataCode
</option>
Next myItem
所有选项标签仍显示IE中的样式。 element仍显示style =“display:none;”。 但它适用于Chrome。如何修复它在IE中工作。?
答案 0 :(得分:1)
&LT;选项&GT;不正式支持style =“display:none”属性
请参阅另一个问题style.display='none' doesn't work on option tags in chrome, but it does in firefox
答案 1 :(得分:0)
在此网站上解决您的问题:https://stackoverflow.com/a/878331/1643075 和demo