我有带有货币列表的引导下拉菜单(简短,3个字母形式)。我需要它作为标准选择输入 - 当按下键盘上的字母时访问和聚焦项目。文档显示可以使用向上/向下键(这是有效的),但我需要完整的功能。这可能吗?
这是代码:
<div class="form-group">
<label for="price"
class="col-md-3 control-label">Choose
currency</label>
<div class="col-md-9">
<div class="btn-group" id="currencyButton">
<button type="button"
class="currency-system btn btn-default hidden"></button>
<button type="button"
class="btn btn-default dropdown-toggle"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
<span
class="caret"></span>
</button>
<ul class="currency-dropdown dropdown-menu" role=menu>
<?php foreach ($currencies as $currency): ?>
<li>
<a onclick="setCurrency('<?= $currency ?>'); return false;"
href="#"><?= $currency ?></a>
</li>
<?php endforeach ?>
</ul>
</div>
<p class="help-block">Choose
your preferred currency.</p>
</div>
</div>