如何将Semantic-UI select的option设置为选中状态?

There is a select has class ui fluid dropdown, I just want to set the option selected when it has be chosen:

<select class="ui fluid dropdown" name="station">
    <option value="">目的地</option>
    {% for station_name, station_code in station_list.items() %}                       
        <option value="{{ station_code }}"
        {% if station == station_name %} selected="selected" {% end %}>{{ station_name }}</option>
    {% end %}     
</select>

When I use bootstrap, it works!

阅读 4k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进