select2在mozilla中可用,但在IE中无效

select2 is working in mozilla but not in IE

本文关键字:但在 IE 无效 mozilla select2      更新时间:2023-09-26

我在表单中使用select2jQuery来显示下拉菜单。一切正常,但IE中没有显示滚动条。溢出选项被隐藏。

<tr>
   <td colspan=2>
      <select data-placeholder=" " name="select1" id="select1" style="width:300px;" class = "chosen-select">        
     <option value=""></option>
          <%
        for (String nature :natureList){
             %>
        <option value="<%=nature%>"><%=nature%></option>
        <%
            }
        %></select>
        <br></br>
    </td>
</tr>

我想您错过了循环中option的结束:

<select data-placeholder=" " name="select1" id="select1" style="width:300px;" class = "chosen-select">      
     <option value=""></option>
     <% for (String nature :natureList){ %>
        <option value="<%=nature%>"><%=nature%></option><!--<<< this closing tag-->
     <% } %>
</select>