选择框问题中的选定选项

时间:2017-06-19 10:43:53

标签: jquery firefox jquery-select2

我在Firefox中面临一个恼人的问题(在其他浏览器中:Chrome,Opera,Edge一切正常)。问题是Firefox没有选择选中属性的选项。当我按 ctrl + F5 时,正确选择了该选项。但我当然不能这样离开。

我试过以下:

  1. 为每个选项添加了autocomplete="off"
  2. 将select放入名称中的表单。
  3. 尝试使用selected selected="selected" selected=""
  4. 代码示例:

    <select class="form-control" id="schoolChooser" style="width:100%">
          @foreach($user_schools as $user_school)
            <option value="{{$user_school->id}}" autocomplete="off"
              @if($school_id == $user_school->id)
                selected
              @endif
              >{{$user_school->name}}</option>
          @endforeach
    </select>
    

0 个答案:

没有答案
相关问题