asp.mvc可编辑下拉列表框(组合框) [英] asp.mvc editable dropdownlist box (combobox)

查看:78
本文介绍了asp.mvc可编辑下拉列表框(组合框)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找解决方案,该问题与我正在研究的当前MVC 4项目有关.我想拥有一个可编辑的dropdownlist控件或combobox,因为我认为有时会调用这种类型的控件.该控件将用作典型的下拉控件,但允许用户键入下拉列表中不存在的值.到目前为止,我的搜索工作并不顺利,因此我希望这个伟大的开发人员社区可以为我指明正确的方向.谢谢!

I am looking for a solution to an issue I have with a current MVC 4 project I am working on. I would like to have an editable dropdownlist control, or combobox as I think this type of control is sometimes called. Where the control would operate as a typical dropdown control, but allow the user to type in a value that is not present in the dropdown list. I have had no luck with my search so far so I am hoping that this great community of developers could point me in the right direction. Thanks!

推荐答案

如果使用HTML,则可以将 input datalist 属性一起使用示例:

If you use HTML then you can use input with datalist attribute Example:

<input type="text" name="fieldName" list="valueList"/>
<datalist id="valueList">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
</datalist>

这篇关于asp.mvc可编辑下拉列表框(组合框)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆