gpt4 book ai didi

html - Flat-ui 选择下拉菜单不起作用

转载 作者:搜寻专家 更新时间:2023-10-31 21:48:55 25 4
gpt4 key购买 nike

我正在使用 Flat-UI ( http://designmodo.github.io/Flat-UI/) 来帮助我构建的小型 MeteorJS 应用程序的前端元素。

我遇到的问题是“选择下拉列表”不起作用。我想知道如何获得期权值(value)。请看下面的标记:

<div class="select2-container form-control select select-primary" id="s2id_autogen1">
<a href="javascript:void(0)" class="select2-choice" tabindex="-1">
<span class="select2-chosen" id="select2-chosen-2">My Profile</span>
<abbr class="select2-search-choice-close"></abbr>
<span class="select2-arrow" role="presentation">
<b role="presentation"></b>
</span>
</a>
<label for="s2id_autogen2" class="select2-offscreen"></label>
<input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-2" id="s2id_autogen2">
</div>
<select class="form-control select select-primary" data-toggle="select" tabindex="-1" title="" style="display: none;">
<optgroup label="Profile">
<option value="0">My Profile</option>
<option value="1">My Friends</option>
</optgroup>
<optgroup label="System">
<option value="2">Messages</option>
<option value="3">My Settings</option>
<option value="4">Logout</option>
</optgroup>
</select>

这就是我们在 flatui 文档中的内容。但是选择下拉菜单不起作用,有人可以帮助我让它工作并从选项中提取值(value)吗?

最佳答案

We have made a custom select due to the inability of styling the system one. It is based on the Select2 plug-in with the source slightly modified to meet Bootstrap naming convention.

选择2 3.5.2

检查这个: http://select2.github.io/select2/

$("#selectList")
.on("change", function(e) { log("change "+JSON.stringify({val:e.val, added:e.added, removed:e.removed})); })

关于html - Flat-ui 选择下拉菜单不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27703891/

25 4 0